{"action":"created","comment":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/43802585","id":43802585,"diff_hunk":"@@ -0,0 +1,69 @@\n+BSUIR_HELPER_ALL_LECTORS_URL = 'http://bsuir-helper.ru/lectors'\n+BSUIR_HELPER_LECTOR_LINK_URL = 'http://bsuir-helper.ru/'\n+\n+class BsuirhelperReviews\n+  attr_reader :lector_reviews\n+\n+  def initialize(agent, group_lectors)\n+    @agent = agent\n+    lectors_from_helper = get_helper_lectors\n+    @lector_reviews = get_lector_reviews(group_lectors, lectors_from_helper)\n+  end\n+\n+  private\n+\n+  def get_helper_lectors\n+    page = Mechanize.new.get(BSUIR_HELPER_ALL_LECTORS_URL)\n+    lectors_links = page.links_with(href: /\\/lectors\\//)\n+    lectors_helper = {}\n+    lectors_links.each do |link|\n+      lector_fio = link.text.gsub(/[\\s]{2,}/,' ')\n+      lector_link = link.uri\n+      lectors_helper[lector_fio] = lector_link\n+    end\n+    lectors_helper\n+  rescue SocketError => e\n+    if e.message == 'getaddrinfo: Name or service not known'\n+      err = \"class: #{self.class.to_s} | error: SocketError | to get #{BSUIR_HELPER_ALL_LECTORS_URL}\"\n+      fail NameError.new(err)\n+    else\n+      fail e\n+    end\n+  end\n+\n+  def get_lector_reviews(group_lectors, lectors_helper)","path":"2015/SergeyShlomin/lab3/lib/bsuirhelper_reviews.rb","position":34,"original_position":34,"commit_id":"69b133ca18b4d5462566a0f12485339c486db220","original_commit_id":"69b133ca18b4d5462566a0f12485339c486db220","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":"Assignment Branch Condition size for get_lector_reviews is too high. [29.56/15]","created_at":"2015-11-03T20:30:33Z","updated_at":"2015-11-03T20:30:33Z","html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/377#discussion_r43802585","pull_request_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377","_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/43802585"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/377#discussion_r43802585"},"pull_request":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377"}}},"pull_request":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377","id":49607491,"html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/377","diff_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/377.diff","patch_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/377.patch","issue_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/377","number":377,"state":"open","locked":false,"title":"Implement task 3","user":{"login":"sergey77","id":1096392,"avatar_url":"https://avatars.githubusercontent.com/u/1096392?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey77","html_url":"https://github.com/sergey77","followers_url":"https://api.github.com/users/sergey77/followers","following_url":"https://api.github.com/users/sergey77/following{/other_user}","gists_url":"https://api.github.com/users/sergey77/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey77/subscriptions","organizations_url":"https://api.github.com/users/sergey77/orgs","repos_url":"https://api.github.com/users/sergey77/repos","events_url":"https://api.github.com/users/sergey77/events{/privacy}","received_events_url":"https://api.github.com/users/sergey77/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-03T20:30:26Z","updated_at":"2015-11-03T20:30:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b4f9e572d5bf30f06e0377b463645d874e77b48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377/commits","review_comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377/comments","review_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/377/comments","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/69b133ca18b4d5462566a0f12485339c486db220","head":{"label":"sergey77:master","ref":"master","sha":"69b133ca18b4d5462566a0f12485339c486db220","user":{"login":"sergey77","id":1096392,"avatar_url":"https://avatars.githubusercontent.com/u/1096392?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey77","html_url":"https://github.com/sergey77","followers_url":"https://api.github.com/users/sergey77/followers","following_url":"https://api.github.com/users/sergey77/following{/other_user}","gists_url":"https://api.github.com/users/sergey77/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey77/subscriptions","organizations_url":"https://api.github.com/users/sergey77/orgs","repos_url":"https://api.github.com/users/sergey77/repos","events_url":"https://api.github.com/users/sergey77/events{/privacy}","received_events_url":"https://api.github.com/users/sergey77/received_events","type":"User","site_admin":false},"repo":{"id":44312264,"name":"bsuir-courses","full_name":"sergey77/bsuir-courses","owner":{"login":"sergey77","id":1096392,"avatar_url":"https://avatars.githubusercontent.com/u/1096392?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey77","html_url":"https://github.com/sergey77","followers_url":"https://api.github.com/users/sergey77/followers","following_url":"https://api.github.com/users/sergey77/following{/other_user}","gists_url":"https://api.github.com/users/sergey77/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey77/subscriptions","organizations_url":"https://api.github.com/users/sergey77/orgs","repos_url":"https://api.github.com/users/sergey77/repos","events_url":"https://api.github.com/users/sergey77/events{/privacy}","received_events_url":"https://api.github.com/users/sergey77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sergey77/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":true,"url":"https://api.github.com/repos/sergey77/bsuir-courses","forks_url":"https://api.github.com/repos/sergey77/bsuir-courses/forks","keys_url":"https://api.github.com/repos/sergey77/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergey77/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergey77/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/sergey77/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/sergey77/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/sergey77/bsuir-courses/events","assignees_url":"https://api.github.com/repos/sergey77/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/sergey77/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/sergey77/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/sergey77/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergey77/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergey77/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergey77/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergey77/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/sergey77/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/sergey77/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/sergey77/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/sergey77/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/sergey77/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/sergey77/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergey77/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergey77/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergey77/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergey77/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/sergey77/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergey77/bsuir-courses/merges","archive_url":"https://api.github.com/repos/sergey77/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergey77/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/sergey77/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/sergey77/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/sergey77/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/sergey77/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergey77/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/sergey77/bsuir-courses/releases{/id}","created_at":"2015-10-15T11:10:44Z","updated_at":"2015-10-15T14:18:53Z","pushed_at":"2015-11-03T20:28:38Z","git_url":"git://github.com/sergey77/bsuir-courses.git","ssh_url":"git@github.com:sergey77/bsuir-courses.git","clone_url":"https://github.com/sergey77/bsuir-courses.git","svn_url":"https://github.com/sergey77/bsuir-courses","homepage":null,"size":549,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubyroidlabs:master","ref":"master","sha":"1051f68e470ac1f0dff8b4782e48ebba10d5e7bc","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14405320,"name":"bsuir-courses","full_name":"rubyroidlabs/bsuir-courses","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":false,"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses","forks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/releases{/id}","created_at":"2013-11-14T19:55:12Z","updated_at":"2015-11-02T21:01:50Z","pushed_at":"2015-11-03T20:30:27Z","git_url":"git://github.com/rubyroidlabs/bsuir-courses.git","ssh_url":"git@github.com:rubyroidlabs/bsuir-courses.git","clone_url":"https://github.com/rubyroidlabs/bsuir-courses.git","svn_url":"https://github.com/rubyroidlabs/bsuir-courses","homepage":null,"size":7018,"stargazers_count":22,"watchers_count":22,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":30,"forks":139,"open_issues":30,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/377"},"issue":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/377"},"comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/377/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/377/commits"},"statuses":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/69b133ca18b4d5462566a0f12485339c486db220"}}}}