{"action":"created","comment":{"url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments/200808245","pull_request_review_id":135199927,"id":200808245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDgwODI0NQ==","diff_hunk":"@@ -0,0 +1,169 @@\n+require File.expand_path(File.dirname(__FILE__) + '/neo')\n+\n+# Project: Create a Proxy Class\n+#\n+# In this assignment, create a proxy class (one is started for you\n+# below).  You should be able to initialize the proxy object with any\n+# object.  Any messages sent to the proxy object should be forwarded\n+# to the target object.  As each message is sent, the proxy should\n+# record the name of the method sent.\n+#\n+# The proxy class is started for you.  You will need to add a method\n+# missing handler and any other supporting methods.  The specification\n+# of the Proxy class is given in the AboutProxyObjectProject koan.\n+\n+#Class proxy\n+class Proxy\n+    attr_reader :messages\n+\n+    def initialize(target_object)\n+        @object = target_object\n+        @messages = []\n+    end\n+\n+    def method_missing(method_name, *args, &block)\n+        @messages << method_name\n+        @object.send method_name, *args, &block\n+    end\n+\n+    def called?(method_name)\n+        @messages.include? method_name\n+    end\n+\n+    def number_of_times_called(method_name)\n+        @messages.find_all { |m| m === method_name }.count\n+    end\n+end\n+\n+# The proxy object should pass the following Koan:\n+class AboutProxyObjectProject < Neo::Koan\n+  def test_proxy_method_returns_wrapped_object\n+    # NOTE: The Television class is defined below\n+    tv = Proxy.new(Television.new)\n+\n+    # HINT: Proxy class is defined above, may need tweaking...\n+\n+    assert tv.instance_of?(Proxy)\n+  end\n+\n+  def test_tv_methods_still_perform_their_function\n+    tv = Proxy.new(Television.new)\n+\n+    tv.channel = 10\n+    tv.power\n+\n+    assert_equal 10, tv.channel\n+    assert tv.on?\n+  end\n+\n+  def test_proxy_records_messages_sent_to_tv\n+    tv = Proxy.new(Television.new)\n+\n+    tv.power\n+    tv.channel = 10\n+\n+    assert_equal [:power, :channel=], tv.messages\n+  end\n+\n+  def test_proxy_handles_invalid_messages\n+    tv = Proxy.new(Television.new)\n+\n+    assert_raise(NoMethodError) do\n+      tv.no_such_method\n+    end\n+  end\n+\n+  def test_proxy_reports_methods_have_been_called\n+    tv = Proxy.new(Television.new)\n+\n+    tv.power\n+    tv.power\n+\n+    assert tv.called?(:power)\n+    assert ! tv.called?(:channel)\n+  end\n+\n+  def test_proxy_counts_method_calls\n+    tv = Proxy.new(Television.new)\n+\n+    tv.power\n+    tv.channel = 48\n+    tv.power\n+\n+    assert_equal 2, tv.number_of_times_called(:power)\n+    assert_equal 1, tv.number_of_times_called(:channel=)\n+    assert_equal 0, tv.number_of_times_called(:on?)\n+  end\n+\n+  def test_proxy_can_record_more_than_just_tv_objects\n+    proxy = Proxy.new('Code Mash 2009')\n+\n+    proxy.upcase!\n+    result = proxy.split\n+\n+    assert_equal ['CODE', 'MASH', '2009'], result\n+    assert_equal [:upcase!, :split], proxy.messages\n+  end\n+end\n+\n+\n+# ====================================================================\n+# The following code is to support the testing of the Proxy class.  No\n+# changes should be necessary to anything below this comment.\n+\n+# Example class using in the proxy testing above.\n+class Television\n+  attr_accessor :channel\n+\n+  def power\n+    if @power == :on","path":"2364/1/koans/about_proxy_object_project.rb","position":119,"original_position":119,"commit_id":"a817ffa33d5496704501552446cae88e9c0275c4","original_commit_id":"a817ffa33d5496704501552446cae88e9c0275c4","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.","created_at":"2018-07-07T10:02:08Z","updated_at":"2018-07-07T10:02:11Z","html_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/49#discussion_r200808245","pull_request_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments/200808245"},"html":{"href":"https://github.com/rubizza-survival-camp/summer-2018/pull/49#discussion_r200808245"},"pull_request":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49","id":199730181,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NzMwMTgx","html_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/49","diff_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/49.diff","patch_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/49.patch","issue_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/49","number":49,"state":"open","locked":false,"title":"2364-1","user":{"login":"Vadser","id":28810011,"node_id":"MDQ6VXNlcjI4ODEwMDEx","avatar_url":"https://avatars0.githubusercontent.com/u/28810011?v=4","gravatar_id":"","url":"https://api.github.com/users/Vadser","html_url":"https://github.com/Vadser","followers_url":"https://api.github.com/users/Vadser/followers","following_url":"https://api.github.com/users/Vadser/following{/other_user}","gists_url":"https://api.github.com/users/Vadser/gists{/gist_id}","starred_url":"https://api.github.com/users/Vadser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vadser/subscriptions","organizations_url":"https://api.github.com/users/Vadser/orgs","repos_url":"https://api.github.com/users/Vadser/repos","events_url":"https://api.github.com/users/Vadser/events{/privacy}","received_events_url":"https://api.github.com/users/Vadser/received_events","type":"User","site_admin":false},"body":"## Номер\r\n2364\r\n\r\n## Номер задания\r\n1\r\n\r\n## Ссылка на видео с демо\r\nhttps://youtu.be/gDlSAe2xd5U\r\n\r\n## Комментарии\r\nСделал все коэны","created_at":"2018-07-06T12:15:41Z","updated_at":"2018-07-07T10:02:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5b0c2096dd17647e6b9f24256e18c040ddbc273","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49/commits","review_comments_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49/comments","review_comment_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/49/comments","statuses_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/statuses/a817ffa33d5496704501552446cae88e9c0275c4","head":{"label":"Vadser:homework-1","ref":"homework-1","sha":"a817ffa33d5496704501552446cae88e9c0275c4","user":{"login":"Vadser","id":28810011,"node_id":"MDQ6VXNlcjI4ODEwMDEx","avatar_url":"https://avatars0.githubusercontent.com/u/28810011?v=4","gravatar_id":"","url":"https://api.github.com/users/Vadser","html_url":"https://github.com/Vadser","followers_url":"https://api.github.com/users/Vadser/followers","following_url":"https://api.github.com/users/Vadser/following{/other_user}","gists_url":"https://api.github.com/users/Vadser/gists{/gist_id}","starred_url":"https://api.github.com/users/Vadser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vadser/subscriptions","organizations_url":"https://api.github.com/users/Vadser/orgs","repos_url":"https://api.github.com/users/Vadser/repos","events_url":"https://api.github.com/users/Vadser/events{/privacy}","received_events_url":"https://api.github.com/users/Vadser/received_events","type":"User","site_admin":false},"repo":{"id":139882808,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4ODI4MDg=","name":"summer-2018","full_name":"Vadser/summer-2018","owner":{"login":"Vadser","id":28810011,"node_id":"MDQ6VXNlcjI4ODEwMDEx","avatar_url":"https://avatars0.githubusercontent.com/u/28810011?v=4","gravatar_id":"","url":"https://api.github.com/users/Vadser","html_url":"https://github.com/Vadser","followers_url":"https://api.github.com/users/Vadser/followers","following_url":"https://api.github.com/users/Vadser/following{/other_user}","gists_url":"https://api.github.com/users/Vadser/gists{/gist_id}","starred_url":"https://api.github.com/users/Vadser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vadser/subscriptions","organizations_url":"https://api.github.com/users/Vadser/orgs","repos_url":"https://api.github.com/users/Vadser/repos","events_url":"https://api.github.com/users/Vadser/events{/privacy}","received_events_url":"https://api.github.com/users/Vadser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vadser/summer-2018","description":null,"fork":true,"url":"https://api.github.com/repos/Vadser/summer-2018","forks_url":"https://api.github.com/repos/Vadser/summer-2018/forks","keys_url":"https://api.github.com/repos/Vadser/summer-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vadser/summer-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vadser/summer-2018/teams","hooks_url":"https://api.github.com/repos/Vadser/summer-2018/hooks","issue_events_url":"https://api.github.com/repos/Vadser/summer-2018/issues/events{/number}","events_url":"https://api.github.com/repos/Vadser/summer-2018/events","assignees_url":"https://api.github.com/repos/Vadser/summer-2018/assignees{/user}","branches_url":"https://api.github.com/repos/Vadser/summer-2018/branches{/branch}","tags_url":"https://api.github.com/repos/Vadser/summer-2018/tags","blobs_url":"https://api.github.com/repos/Vadser/summer-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vadser/summer-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vadser/summer-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vadser/summer-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vadser/summer-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/Vadser/summer-2018/languages","stargazers_url":"https://api.github.com/repos/Vadser/summer-2018/stargazers","contributors_url":"https://api.github.com/repos/Vadser/summer-2018/contributors","subscribers_url":"https://api.github.com/repos/Vadser/summer-2018/subscribers","subscription_url":"https://api.github.com/repos/Vadser/summer-2018/subscription","commits_url":"https://api.github.com/repos/Vadser/summer-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vadser/summer-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vadser/summer-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vadser/summer-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vadser/summer-2018/contents/{+path}","compare_url":"https://api.github.com/repos/Vadser/summer-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vadser/summer-2018/merges","archive_url":"https://api.github.com/repos/Vadser/summer-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vadser/summer-2018/downloads","issues_url":"https://api.github.com/repos/Vadser/summer-2018/issues{/number}","pulls_url":"https://api.github.com/repos/Vadser/summer-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/Vadser/summer-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/Vadser/summer-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vadser/summer-2018/labels{/name}","releases_url":"https://api.github.com/repos/Vadser/summer-2018/releases{/id}","deployments_url":"https://api.github.com/repos/Vadser/summer-2018/deployments","created_at":"2018-07-05T17:48:33Z","updated_at":"2018-07-05T17:48:35Z","pushed_at":"2018-07-07T10:01:46Z","git_url":"git://github.com/Vadser/summer-2018.git","ssh_url":"git@github.com:Vadser/summer-2018.git","clone_url":"https://github.com/Vadser/summer-2018.git","svn_url":"https://github.com/Vadser/summer-2018","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubizza-survival-camp:master","ref":"master","sha":"e84e8c460408948258222b414cb8170b5a5b640b","user":{"login":"rubizza-survival-camp","id":40864986,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwODY0OTg2","avatar_url":"https://avatars1.githubusercontent.com/u/40864986?v=4","gravatar_id":"","url":"https://api.github.com/users/rubizza-survival-camp","html_url":"https://github.com/rubizza-survival-camp","followers_url":"https://api.github.com/users/rubizza-survival-camp/followers","following_url":"https://api.github.com/users/rubizza-survival-camp/following{/other_user}","gists_url":"https://api.github.com/users/rubizza-survival-camp/gists{/gist_id}","starred_url":"https://api.github.com/users/rubizza-survival-camp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubizza-survival-camp/subscriptions","organizations_url":"https://api.github.com/users/rubizza-survival-camp/orgs","repos_url":"https://api.github.com/users/rubizza-survival-camp/repos","events_url":"https://api.github.com/users/rubizza-survival-camp/events{/privacy}","received_events_url":"https://api.github.com/users/rubizza-survival-camp/received_events","type":"Organization","site_admin":false},"repo":{"id":139868408,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4Njg0MDg=","name":"summer-2018","full_name":"rubizza-survival-camp/summer-2018","owner":{"login":"rubizza-survival-camp","id":40864986,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwODY0OTg2","avatar_url":"https://avatars1.githubusercontent.com/u/40864986?v=4","gravatar_id":"","url":"https://api.github.com/users/rubizza-survival-camp","html_url":"https://github.com/rubizza-survival-camp","followers_url":"https://api.github.com/users/rubizza-survival-camp/followers","following_url":"https://api.github.com/users/rubizza-survival-camp/following{/other_user}","gists_url":"https://api.github.com/users/rubizza-survival-camp/gists{/gist_id}","starred_url":"https://api.github.com/users/rubizza-survival-camp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubizza-survival-camp/subscriptions","organizations_url":"https://api.github.com/users/rubizza-survival-camp/orgs","repos_url":"https://api.github.com/users/rubizza-survival-camp/repos","events_url":"https://api.github.com/users/rubizza-survival-camp/events{/privacy}","received_events_url":"https://api.github.com/users/rubizza-survival-camp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubizza-survival-camp/summer-2018","description":null,"fork":false,"url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018","forks_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/forks","keys_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/teams","hooks_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/hooks","issue_events_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/events{/number}","events_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/events","assignees_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/assignees{/user}","branches_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/branches{/branch}","tags_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/tags","blobs_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/languages","stargazers_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/stargazers","contributors_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/contributors","subscribers_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/subscribers","subscription_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/subscription","commits_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/contents/{+path}","compare_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/merges","archive_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/downloads","issues_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues{/number}","pulls_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/labels{/name}","releases_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/releases{/id}","deployments_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/deployments","created_at":"2018-07-05T15:28:12Z","updated_at":"2018-07-07T09:32:00Z","pushed_at":"2018-07-07T10:01:48Z","git_url":"git://github.com/rubizza-survival-camp/summer-2018.git","ssh_url":"git@github.com:rubizza-survival-camp/summer-2018.git","clone_url":"https://github.com/rubizza-survival-camp/summer-2018.git","svn_url":"https://github.com/rubizza-survival-camp/summer-2018","homepage":null,"size":83982,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":49,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49"},"html":{"href":"https://github.com/rubizza-survival-camp/summer-2018/pull/49"},"issue":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/49"},"comments":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/statuses/a817ffa33d5496704501552446cae88e9c0275c4"}},"author_association":"NONE"}}
{"actor":{"display_login":"houndci-bot"}}