GitHub PullRequestReviewCommentEvent at 2014-09-04 17:41:33
Repository: trepscore-services
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/comments/17129615","id":17129615,"diff_hunk":"@@ -8,16 +8,16 @@ class Pipedrive::Client < Pipedrive::Base\n \n   def metrics\n     metrics = {}\n-    \n+\n     %i{activities deals organizations persons}.each do |source|\n       metrics[source] = send(source).metrics\n     end\n \n     metrics\n   end\n-  \n+\n   def method_missing(name, *args, &block)\n-    begin \n+    begin","path":"lib/trepscore/services/pipedrive/client.rb","position":16,"original_position":16,"commit_id":"1ac8d8f59dcdfa9839def298b7b19872512a2563","original_commit_id":"1ac8d8f59dcdfa9839def298b7b19872512a2563","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","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":"Redundant `begin` block detected.","created_at":"2014-09-04T17:41:33Z","updated_at":"2014-09-04T17:41:33Z","html_url":"https://github.com/25-ventures/trepscore-services/pull/6#discussion_r17129615","pull_request_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/comments/17129615"},"html":{"href":"https://github.com/25-ventures/trepscore-services/pull/6#discussion_r17129615"},"pull_request":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6","id":20757728,"html_url":"https://github.com/25-ventures/trepscore-services/pull/6","diff_url":"https://github.com/25-ventures/trepscore-services/pull/6.diff","patch_url":"https://github.com/25-ventures/trepscore-services/pull/6.patch","issue_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/6","number":6,"state":"open","locked":false,"title":"Improve internal and external interface","user":{"login":"ryanfaerman","id":218121,"avatar_url":"https://avatars.githubusercontent.com/u/218121?v=2","gravatar_id":"58d17511dbfa2b472061bf266ec8701a","url":"https://api.github.com/users/ryanfaerman","html_url":"https://github.com/ryanfaerman","followers_url":"https://api.github.com/users/ryanfaerman/followers","following_url":"https://api.github.com/users/ryanfaerman/following{/other_user}","gists_url":"https://api.github.com/users/ryanfaerman/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanfaerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanfaerman/subscriptions","organizations_url":"https://api.github.com/users/ryanfaerman/orgs","repos_url":"https://api.github.com/users/ryanfaerman/repos","events_url":"https://api.github.com/users/ryanfaerman/events{/privacy}","received_events_url":"https://api.github.com/users/ryanfaerman/received_events","type":"User","site_admin":false},"body":"The gem was decomposed into several files and moved into the TrepScore::Services namespace. \r\n\r\nWe also gain a few new features:\r\n\r\n- required vs optional parameters\r\n- retrieving data for a given time period\r\n- automatic enforcing of required schema attributes\r\n- custom validations for schema data\r\n- connection test method to confirm provided data against the 3rd party service\r\n\r\n```ruby\r\nmodule TrepScore\r\n  module Services\r\n    class Pipedrive < Service\r\n      category :crm\r\n\r\n      required do\r\n        string :token\r\n      end\r\n\r\n      def call(period)\r\n        client = ::Pipedrive::Client.new(api_token: data['token'])\r\n        client.metrics(period)\r\n      end\r\n\r\n      def validate\r\n        unless data['token'].length == 28\r\n          raise_config_error('Token appears to be invalid')\r\n        end\r\n      end\r\n\r\n      def test\r\n        # Check Credentials\r\n      end\r\n    end\r\n  end\r\nend\r\n```","created_at":"2014-09-04T17:01:19Z","updated_at":"2014-09-04T17:41:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"786aced9423071a7ac9936f05ccc8fe3dddb72ce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6/commits","review_comments_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6/comments","review_comment_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/comments/{number}","comments_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/6/comments","statuses_url":"https://api.github.com/repos/25-ventures/trepscore-services/statuses/1ac8d8f59dcdfa9839def298b7b19872512a2563","head":{"label":"25-ventures:feature/annotate-requirements","ref":"feature/annotate-requirements","sha":"1ac8d8f59dcdfa9839def298b7b19872512a2563","user":{"login":"25-ventures","id":7054685,"avatar_url":"https://avatars.githubusercontent.com/u/7054685?v=2","gravatar_id":null,"url":"https://api.github.com/users/25-ventures","html_url":"https://github.com/25-ventures","followers_url":"https://api.github.com/users/25-ventures/followers","following_url":"https://api.github.com/users/25-ventures/following{/other_user}","gists_url":"https://api.github.com/users/25-ventures/gists{/gist_id}","starred_url":"https://api.github.com/users/25-ventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25-ventures/subscriptions","organizations_url":"https://api.github.com/users/25-ventures/orgs","repos_url":"https://api.github.com/users/25-ventures/repos","events_url":"https://api.github.com/users/25-ventures/events{/privacy}","received_events_url":"https://api.github.com/users/25-ventures/received_events","type":"Organization","site_admin":false},"repo":{"id":21438040,"name":"trepscore-services","full_name":"25-ventures/trepscore-services","owner":{"login":"25-ventures","id":7054685,"avatar_url":"https://avatars.githubusercontent.com/u/7054685?v=2","gravatar_id":null,"url":"https://api.github.com/users/25-ventures","html_url":"https://github.com/25-ventures","followers_url":"https://api.github.com/users/25-ventures/followers","following_url":"https://api.github.com/users/25-ventures/following{/other_user}","gists_url":"https://api.github.com/users/25-ventures/gists{/gist_id}","starred_url":"https://api.github.com/users/25-ventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25-ventures/subscriptions","organizations_url":"https://api.github.com/users/25-ventures/orgs","repos_url":"https://api.github.com/users/25-ventures/repos","events_url":"https://api.github.com/users/25-ventures/events{/privacy}","received_events_url":"https://api.github.com/users/25-ventures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/25-ventures/trepscore-services","description":"Official Trepscore Services integration","fork":false,"url":"https://api.github.com/repos/25-ventures/trepscore-services","forks_url":"https://api.github.com/repos/25-ventures/trepscore-services/forks","keys_url":"https://api.github.com/repos/25-ventures/trepscore-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/25-ventures/trepscore-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/25-ventures/trepscore-services/teams","hooks_url":"https://api.github.com/repos/25-ventures/trepscore-services/hooks","issue_events_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/events{/number}","events_url":"https://api.github.com/repos/25-ventures/trepscore-services/events","assignees_url":"https://api.github.com/repos/25-ventures/trepscore-services/assignees{/user}","branches_url":"https://api.github.com/repos/25-ventures/trepscore-services/branches{/branch}","tags_url":"https://api.github.com/repos/25-ventures/trepscore-services/tags","blobs_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/25-ventures/trepscore-services/statuses/{sha}","languages_url":"https://api.github.com/repos/25-ventures/trepscore-services/languages","stargazers_url":"https://api.github.com/repos/25-ventures/trepscore-services/stargazers","contributors_url":"https://api.github.com/repos/25-ventures/trepscore-services/contributors","subscribers_url":"https://api.github.com/repos/25-ventures/trepscore-services/subscribers","subscription_url":"https://api.github.com/repos/25-ventures/trepscore-services/subscription","commits_url":"https://api.github.com/repos/25-ventures/trepscore-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/25-ventures/trepscore-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/comments/{number}","contents_url":"https://api.github.com/repos/25-ventures/trepscore-services/contents/{+path}","compare_url":"https://api.github.com/repos/25-ventures/trepscore-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/25-ventures/trepscore-services/merges","archive_url":"https://api.github.com/repos/25-ventures/trepscore-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/25-ventures/trepscore-services/downloads","issues_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues{/number}","pulls_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls{/number}","milestones_url":"https://api.github.com/repos/25-ventures/trepscore-services/milestones{/number}","notifications_url":"https://api.github.com/repos/25-ventures/trepscore-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/25-ventures/trepscore-services/labels{/name}","releases_url":"https://api.github.com/repos/25-ventures/trepscore-services/releases{/id}","created_at":"2014-07-02T19:44:09Z","updated_at":"2014-07-14T16:46:14Z","pushed_at":"2014-09-04T17:41:27Z","git_url":"git://github.com/25-ventures/trepscore-services.git","ssh_url":"git@github.com:25-ventures/trepscore-services.git","clone_url":"https://github.com/25-ventures/trepscore-services.git","svn_url":"https://github.com/25-ventures/trepscore-services","homepage":"developer.trepscore.com/integrations","size":1834,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"25-ventures:master","ref":"master","sha":"0d7b5192e2d04f7569cd744cae15cebf5c5fe5b1","user":{"login":"25-ventures","id":7054685,"avatar_url":"https://avatars.githubusercontent.com/u/7054685?v=2","gravatar_id":null,"url":"https://api.github.com/users/25-ventures","html_url":"https://github.com/25-ventures","followers_url":"https://api.github.com/users/25-ventures/followers","following_url":"https://api.github.com/users/25-ventures/following{/other_user}","gists_url":"https://api.github.com/users/25-ventures/gists{/gist_id}","starred_url":"https://api.github.com/users/25-ventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25-ventures/subscriptions","organizations_url":"https://api.github.com/users/25-ventures/orgs","repos_url":"https://api.github.com/users/25-ventures/repos","events_url":"https://api.github.com/users/25-ventures/events{/privacy}","received_events_url":"https://api.github.com/users/25-ventures/received_events","type":"Organization","site_admin":false},"repo":{"id":21438040,"name":"trepscore-services","full_name":"25-ventures/trepscore-services","owner":{"login":"25-ventures","id":7054685,"avatar_url":"https://avatars.githubusercontent.com/u/7054685?v=2","gravatar_id":null,"url":"https://api.github.com/users/25-ventures","html_url":"https://github.com/25-ventures","followers_url":"https://api.github.com/users/25-ventures/followers","following_url":"https://api.github.com/users/25-ventures/following{/other_user}","gists_url":"https://api.github.com/users/25-ventures/gists{/gist_id}","starred_url":"https://api.github.com/users/25-ventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/25-ventures/subscriptions","organizations_url":"https://api.github.com/users/25-ventures/orgs","repos_url":"https://api.github.com/users/25-ventures/repos","events_url":"https://api.github.com/users/25-ventures/events{/privacy}","received_events_url":"https://api.github.com/users/25-ventures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/25-ventures/trepscore-services","description":"Official Trepscore Services integration","fork":false,"url":"https://api.github.com/repos/25-ventures/trepscore-services","forks_url":"https://api.github.com/repos/25-ventures/trepscore-services/forks","keys_url":"https://api.github.com/repos/25-ventures/trepscore-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/25-ventures/trepscore-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/25-ventures/trepscore-services/teams","hooks_url":"https://api.github.com/repos/25-ventures/trepscore-services/hooks","issue_events_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/events{/number}","events_url":"https://api.github.com/repos/25-ventures/trepscore-services/events","assignees_url":"https://api.github.com/repos/25-ventures/trepscore-services/assignees{/user}","branches_url":"https://api.github.com/repos/25-ventures/trepscore-services/branches{/branch}","tags_url":"https://api.github.com/repos/25-ventures/trepscore-services/tags","blobs_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/25-ventures/trepscore-services/statuses/{sha}","languages_url":"https://api.github.com/repos/25-ventures/trepscore-services/languages","stargazers_url":"https://api.github.com/repos/25-ventures/trepscore-services/stargazers","contributors_url":"https://api.github.com/repos/25-ventures/trepscore-services/contributors","subscribers_url":"https://api.github.com/repos/25-ventures/trepscore-services/subscribers","subscription_url":"https://api.github.com/repos/25-ventures/trepscore-services/subscription","commits_url":"https://api.github.com/repos/25-ventures/trepscore-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/25-ventures/trepscore-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/25-ventures/trepscore-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues/comments/{number}","contents_url":"https://api.github.com/repos/25-ventures/trepscore-services/contents/{+path}","compare_url":"https://api.github.com/repos/25-ventures/trepscore-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/25-ventures/trepscore-services/merges","archive_url":"https://api.github.com/repos/25-ventures/trepscore-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/25-ventures/trepscore-services/downloads","issues_url":"https://api.github.com/repos/25-ventures/trepscore-services/issues{/number}","pulls_url":"https://api.github.com/repos/25-ventures/trepscore-services/pulls{/number}","milestones_url":"https://api.github.com/repos/25-ventures/trepscore-services/milestones{/number}","notifications_url":"https://api.github.com/repos/25-ventures/trepscore-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/25-ventures/trepscore-services/labels{/name}","releases_url":"https://api.github.com/repos/25-ventures/trepscore-services/releases{/id}","created_at":"2014-07-02T19:44:09Z","updated_at":"2014-07-14T16:46:14Z","pushed_at":"2014-09-04T17:41:27Z","git_url":"git://github.com/25-ventures/trepscore-services.git","ssh_url":"git@github.com:25-ventures/trepscore-services.git","clone_url":"https://github.com/25-ventures/trepscore-services.git","svn_url":"https://github.com/25-ventures/trepscore-services","homepage":"developer.trepscore.com/integrations","size":1834,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6"},"html":{"href":"https://github.com/25-ventures/trepscore-services/pull/6"},"issue":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/issues/6"},"comments":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/25-ventures/trepscore-services/statuses/1ac8d8f59dcdfa9839def298b7b19872512a2563"}}}}