GitHub PullRequestReviewCommentEvent at 2014-06-09 17:41:52
Repository: zertico
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/zertico/zertico/pulls/comments/13553710","id":13553710,"diff_hunk":"@@ -2,45 +2,49 @@\n \n module Zertico\n   class Controller < ActionController::Base\n+    attr_reader :service\n+    \n     def initialize\n-      begin\n-        extend \"::#{self.class.name.chomp('Controller').concat('Service')}\".constantize\n-      rescue NameError\n-        extend Zertico::Service\n-      end\n+      @service ||= \"::#{self.class.name.chomp('Controller').concat('Service')}\".constantize.new\n+    rescue NameError\n+      @service ||= Zertico::Service.new\n+    ensure\n       super\n     end\n \n     def index\n-      respond_with(all, options)\n+      instance_variable_set(\"@#{service.interface_name.pluralize}\", service.index)\n+      respond_with(instance_variable_get(\"@#{service.interface_name.pluralize}\"), service.responder_settings_for_index)\n     end\n \n     def new\n-      respond_with(build, options)\n+      instance_variable_set(\"@#{service.interface_name}\", service.new)\n+      respond_with(instance_variable_get(\"@#{service.interface_name}\"), service.responder_settings_for_new)\n     end\n \n     def show\n-      respond_with(find, options)\n+      instance_variable_set(\"@#{service.interface_name}\", service.show(params))\n+      respond_with(instance_variable_get(\"@#{service.interface_name}\"), service.responder_settings_for_show)\n     end\n \n     def edit\n-      respond_with(find, options)\n+      instance_variable_set(\"@#{service.interface_name}\", service.show(params))\n+      respond_with(instance_variable_get(\"@#{service.interface_name}\"), service.responder_settings_for_edit)\n     end\n \n     def create\n-      respond_with(generate, options)\n+      instance_variable_set(\"@#{service.interface_name}\", service.create(params))\n+      respond_with(instance_variable_get(\"@#{service.interface_name}\"), service.responder_settings_for_create)","path":"lib/zertico/controller.rb","position":46,"original_position":46,"commit_id":"8e95f8deef30317d83ee8d940ff385958933bc5a","original_commit_id":"8e95f8deef30317d83ee8d940ff385958933bc5a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?","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":"Line is too long. [110/80]","created_at":"2014-06-09T17:41:52Z","updated_at":"2014-06-09T17:41:52Z","html_url":"https://github.com/zertico/zertico/pull/8#discussion_r13553710","pull_request_url":"https://api.github.com/repos/zertico/zertico/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/zertico/zertico/pulls/comments/13553710"},"html":{"href":"https://github.com/zertico/zertico/pull/8#discussion_r13553710"},"pull_request":{"href":"https://api.github.com/repos/zertico/zertico/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/zertico/zertico/pulls/8","id":16897437,"html_url":"https://github.com/zertico/zertico/pull/8","diff_url":"https://github.com/zertico/zertico/pull/8.diff","patch_url":"https://github.com/zertico/zertico/pull/8.patch","issue_url":"https://api.github.com/repos/zertico/zertico/issues/8","number":8,"state":"open","title":"Improving service","user":{"login":"plribeiro3000","id":672952,"avatar_url":"https://avatars.githubusercontent.com/u/672952?","gravatar_id":"4b897719c13e333a89392b9360868761","url":"https://api.github.com/users/plribeiro3000","html_url":"https://github.com/plribeiro3000","followers_url":"https://api.github.com/users/plribeiro3000/followers","following_url":"https://api.github.com/users/plribeiro3000/following{/other_user}","gists_url":"https://api.github.com/users/plribeiro3000/gists{/gist_id}","starred_url":"https://api.github.com/users/plribeiro3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plribeiro3000/subscriptions","organizations_url":"https://api.github.com/users/plribeiro3000/orgs","repos_url":"https://api.github.com/users/plribeiro3000/repos","events_url":"https://api.github.com/users/plribeiro3000/events{/privacy}","received_events_url":"https://api.github.com/users/plribeiro3000/received_events","type":"User","site_admin":false},"body":"Redefining Service as a class to create great apis to define the behavior.","created_at":"2014-06-09T17:41:44Z","updated_at":"2014-06-09T17:41:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f372e19aa94052619d18afb46adf3577977c48f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zertico/zertico/pulls/8/commits","review_comments_url":"https://api.github.com/repos/zertico/zertico/pulls/8/comments","review_comment_url":"https://api.github.com/repos/zertico/zertico/pulls/comments/{number}","comments_url":"https://api.github.com/repos/zertico/zertico/issues/8/comments","statuses_url":"https://api.github.com/repos/zertico/zertico/statuses/8e95f8deef30317d83ee8d940ff385958933bc5a","head":{"label":"zertico:improving_service","ref":"improving_service","sha":"8e95f8deef30317d83ee8d940ff385958933bc5a","user":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"repo":{"id":8859116,"name":"zertico","full_name":"zertico/zertico","owner":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zertico/zertico","description":"Collection of Patterns and Tools to increase development speed","fork":false,"url":"https://api.github.com/repos/zertico/zertico","forks_url":"https://api.github.com/repos/zertico/zertico/forks","keys_url":"https://api.github.com/repos/zertico/zertico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zertico/zertico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zertico/zertico/teams","hooks_url":"https://api.github.com/repos/zertico/zertico/hooks","issue_events_url":"https://api.github.com/repos/zertico/zertico/issues/events{/number}","events_url":"https://api.github.com/repos/zertico/zertico/events","assignees_url":"https://api.github.com/repos/zertico/zertico/assignees{/user}","branches_url":"https://api.github.com/repos/zertico/zertico/branches{/branch}","tags_url":"https://api.github.com/repos/zertico/zertico/tags","blobs_url":"https://api.github.com/repos/zertico/zertico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zertico/zertico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zertico/zertico/git/refs{/sha}","trees_url":"https://api.github.com/repos/zertico/zertico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zertico/zertico/statuses/{sha}","languages_url":"https://api.github.com/repos/zertico/zertico/languages","stargazers_url":"https://api.github.com/repos/zertico/zertico/stargazers","contributors_url":"https://api.github.com/repos/zertico/zertico/contributors","subscribers_url":"https://api.github.com/repos/zertico/zertico/subscribers","subscription_url":"https://api.github.com/repos/zertico/zertico/subscription","commits_url":"https://api.github.com/repos/zertico/zertico/commits{/sha}","git_commits_url":"https://api.github.com/repos/zertico/zertico/git/commits{/sha}","comments_url":"https://api.github.com/repos/zertico/zertico/comments{/number}","issue_comment_url":"https://api.github.com/repos/zertico/zertico/issues/comments/{number}","contents_url":"https://api.github.com/repos/zertico/zertico/contents/{+path}","compare_url":"https://api.github.com/repos/zertico/zertico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zertico/zertico/merges","archive_url":"https://api.github.com/repos/zertico/zertico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zertico/zertico/downloads","issues_url":"https://api.github.com/repos/zertico/zertico/issues{/number}","pulls_url":"https://api.github.com/repos/zertico/zertico/pulls{/number}","milestones_url":"https://api.github.com/repos/zertico/zertico/milestones{/number}","notifications_url":"https://api.github.com/repos/zertico/zertico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zertico/zertico/labels{/name}","releases_url":"https://api.github.com/repos/zertico/zertico/releases{/id}","created_at":"2013-03-18T16:51:40Z","updated_at":"2014-06-09T17:41:44Z","pushed_at":"2014-06-09T17:32:38Z","git_url":"git://github.com/zertico/zertico.git","ssh_url":"git@github.com:zertico/zertico.git","clone_url":"https://github.com/zertico/zertico.git","svn_url":"https://github.com/zertico/zertico","homepage":"","size":688,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"zertico:master","ref":"master","sha":"2457ccb939177952252c305031f0e88ca6b4585f","user":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"repo":{"id":8859116,"name":"zertico","full_name":"zertico/zertico","owner":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zertico/zertico","description":"Collection of Patterns and Tools to increase development speed","fork":false,"url":"https://api.github.com/repos/zertico/zertico","forks_url":"https://api.github.com/repos/zertico/zertico/forks","keys_url":"https://api.github.com/repos/zertico/zertico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zertico/zertico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zertico/zertico/teams","hooks_url":"https://api.github.com/repos/zertico/zertico/hooks","issue_events_url":"https://api.github.com/repos/zertico/zertico/issues/events{/number}","events_url":"https://api.github.com/repos/zertico/zertico/events","assignees_url":"https://api.github.com/repos/zertico/zertico/assignees{/user}","branches_url":"https://api.github.com/repos/zertico/zertico/branches{/branch}","tags_url":"https://api.github.com/repos/zertico/zertico/tags","blobs_url":"https://api.github.com/repos/zertico/zertico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zertico/zertico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zertico/zertico/git/refs{/sha}","trees_url":"https://api.github.com/repos/zertico/zertico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zertico/zertico/statuses/{sha}","languages_url":"https://api.github.com/repos/zertico/zertico/languages","stargazers_url":"https://api.github.com/repos/zertico/zertico/stargazers","contributors_url":"https://api.github.com/repos/zertico/zertico/contributors","subscribers_url":"https://api.github.com/repos/zertico/zertico/subscribers","subscription_url":"https://api.github.com/repos/zertico/zertico/subscription","commits_url":"https://api.github.com/repos/zertico/zertico/commits{/sha}","git_commits_url":"https://api.github.com/repos/zertico/zertico/git/commits{/sha}","comments_url":"https://api.github.com/repos/zertico/zertico/comments{/number}","issue_comment_url":"https://api.github.com/repos/zertico/zertico/issues/comments/{number}","contents_url":"https://api.github.com/repos/zertico/zertico/contents/{+path}","compare_url":"https://api.github.com/repos/zertico/zertico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zertico/zertico/merges","archive_url":"https://api.github.com/repos/zertico/zertico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zertico/zertico/downloads","issues_url":"https://api.github.com/repos/zertico/zertico/issues{/number}","pulls_url":"https://api.github.com/repos/zertico/zertico/pulls{/number}","milestones_url":"https://api.github.com/repos/zertico/zertico/milestones{/number}","notifications_url":"https://api.github.com/repos/zertico/zertico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zertico/zertico/labels{/name}","releases_url":"https://api.github.com/repos/zertico/zertico/releases{/id}","created_at":"2013-03-18T16:51:40Z","updated_at":"2014-06-09T17:41:44Z","pushed_at":"2014-06-09T17:32:38Z","git_url":"git://github.com/zertico/zertico.git","ssh_url":"git@github.com:zertico/zertico.git","clone_url":"https://github.com/zertico/zertico.git","svn_url":"https://github.com/zertico/zertico","homepage":"","size":688,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zertico/zertico/pulls/8"},"html":{"href":"https://github.com/zertico/zertico/pull/8"},"issue":{"href":"https://api.github.com/repos/zertico/zertico/issues/8"},"comments":{"href":"https://api.github.com/repos/zertico/zertico/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/zertico/zertico/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/zertico/zertico/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/zertico/zertico/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/zertico/zertico/statuses/8e95f8deef30317d83ee8d940ff385958933bc5a"}}}}