{"action":"created","comment":{"url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments/201489526","pull_request_review_id":136003054,"id":201489526,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTQ4OTUyNg==","diff_hunk":"@@ -0,0 +1,145 @@\n+require File.expand_path(File.dirname(__FILE__) + '/neo')\n+# rubocop:disable Style/MixinUsage\n+include Java\n+# rubocop:enable Style/MixinUsage\n+# Concepts\n+# * Pull in a java class\n+# * calling a method, Camel vs snake\n+# * Resolving module/class name conflicts\n+# * Showing what gets returned\n+# * Ruby Strings  VS Java Strings\n+# * Calling custom java class\n+# * Calling Ruby from java???\n+\n+class AboutJavaInterop < Neo::Koan\n+  def test_using_a_java_library_class\n+    java_array = java.util.ArrayList.new\n+    assert_equal __, java_array.class\n+  end\n+\n+  def test_java_class_can_be_referenced_using_both_ruby_and_java_like_syntax\n+    assert_equal __, Java::JavaUtil::ArrayList == java.util.ArrayList\n+  end\n+\n+  def test_include_class_includes_class_in_module_scope\n+    assert_nil defined?(TreeSet)\n+    include_class 'java.util.TreeSet'\n+    assert_equal __, defined?(TreeSet)\n+  end\n+\n+  # THINK ABOUT IT:\n+  #\n+  # What if we use:\n+  #\n+  #   include_class 'java.lang.String'\n+  #\n+  # What would be the value of the String constant after this\n+  # include_class is run?  Would it be useful to provide a way of\n+  # aliasing java classes to different names?\n+\n+  JString = java.lang.String\n+  def test_also_java_class_can_be_given_ruby_aliases\n+    java_string = JString.new('A Java String')\n+    assert_equal __, java_string.class\n+    assert_equal __, JString\n+  end\n+\n+  def test_can_directly_call_java_methods_on_java_objects\n+    java_string = JString.new('A Java String')\n+    assert_equal __, java_string.toLowerCase\n+  end\n+\n+  def test_jruby_provides_snake_case_versions_of_java_methods\n+    java_string = JString.new('A Java String')\n+    assert_equal __, java_string.to_lower_case\n+  end\n+\n+  def test_jruby_provides_question_mark_versions_of_boolean_methods\n+    java_string = JString.new('A Java String')\n+    assert_equal __, java_string.endsWith('String')\n+    assert_equal __, java_string.ends_with('String')\n+    assert_equal __, java_string.ends_with?('String')\n+  end\n+\n+  # :reek:DuplicateMethodCall\n+  def test_java_string_are_not_ruby_strings\n+    ruby_string = 'A Java String'\n+    java_string = java.lang.String.new(ruby_string)\n+    assert_equal __, java_string.is_a?(java.lang.String)\n+    assert_equal __, java_string.is_a?(String)\n+  end\n+\n+  def test_java_strings_can_be_compared_to_ruby_strings_maybe\n+    ruby_string = 'A Java String'\n+    java_string = java.lang.String.new(ruby_string)\n+    assert_equal __, ruby_string == java_string\n+    assert_equal __, java_string == ruby_string\n+\n+    # THINK ABOUT IT:\n+    #\n+    # Is there any possible way for this to be more wrong?\n+    #\n+    # SERIOUSLY, THINK ABOUT IT:\n+    #\n+    # Why do you suppose that Ruby and Java strings compare like that?\n+    #\n+    # ADVANCED THINK ABOUT IT:\n+    #\n+    # Is there a way to make Ruby/Java string comparisons commutative?\n+    # How would you do it?\n+  end\n+\n+  # rubocop:disable Metrics/AbcSize\n+  # :reek:DuplicateMethodCall\n+  def test_however_most_methods_returning_strings_return_ruby_strings\n+    java_array = java.util.ArrayList.new\n+    assert_equal __, java_array.toString\n+    assert_equal __, java_array.toString.is_a?(String)\n+    assert_equal __, java_array.toString.is_a?(java.lang.String)\n+  end\n+\n+  def test_some_ruby_objects_can_be_coerced_to_java\n+    assert_equal __, 'ruby string'.to_java.class\n+    assert_equal __, 1.to_java.class\n+    assert_equal __, 9.32.to_java.class\n+    assert_equal __, false.to_java.class\n+  end\n+\n+  def test_some_ruby_objects_are_not_coerced_to_what_you_might_expect\n+    assert_equal __, [].to_java.class == Java::JavaUtil::ArrayList\n+    assert_equal __, {}.to_java.class == Java::JavaUtil::HashMap\n+    assert_equal __, Object.new.to_java.class == Java::JavaLang::Object\n+  end\n+\n+  # rubocop:enable Metrics/AbcSize\n+  def test_java_collections_are_enumerable\n+    java_array = java.util.ArrayList.new\n+    java_array << 'one' << 'two' << 'three'\n+    assert_equal __, (java_array.map { :upcase })\n+  end\n+\n+  # ------------------------------------------------------------------\n+\n+  # Open the Java ArrayList class and add a new method.\n+  # :reek:IrresponsibleModule\n+  class Java\n+    class JavaUtil\n+      class ArrayList","path":"2269/1/koans/about_java_interop.rb","position":127,"original_position":127,"commit_id":"6996f1ead473466f558577aeaf76efdff7145677","original_commit_id":"6996f1ead473466f558577aeaf76efdff7145677","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/Documentation: Missing top-level class documentation comment.","created_at":"2018-07-10T20:48:39Z","updated_at":"2018-07-10T20:48:41Z","html_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/92#discussion_r201489526","pull_request_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/comments/201489526"},"html":{"href":"https://github.com/rubizza-survival-camp/summer-2018/pull/92#discussion_r201489526"},"pull_request":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92","id":199952115,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTUyMTE1","html_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/92","diff_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/92.diff","patch_url":"https://github.com/rubizza-survival-camp/summer-2018/pull/92.patch","issue_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/92","number":92,"state":"open","locked":false,"title":"2269/1","user":{"login":"Evenstein","id":19613588,"node_id":"MDQ6VXNlcjE5NjEzNTg4","avatar_url":"https://avatars2.githubusercontent.com/u/19613588?v=4","gravatar_id":"","url":"https://api.github.com/users/Evenstein","html_url":"https://github.com/Evenstein","followers_url":"https://api.github.com/users/Evenstein/followers","following_url":"https://api.github.com/users/Evenstein/following{/other_user}","gists_url":"https://api.github.com/users/Evenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/Evenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evenstein/subscriptions","organizations_url":"https://api.github.com/users/Evenstein/orgs","repos_url":"https://api.github.com/users/Evenstein/repos","events_url":"https://api.github.com/users/Evenstein/events{/privacy}","received_events_url":"https://api.github.com/users/Evenstein/received_events","type":"User","site_admin":false},"body":"## Номер\r\n2269\r\n\r\n## Номер задания\r\n1\r\n\r\n## Ссылка на видео с демо\r\nhttps://youtu.be/N3hZfmklPXE\r\n\r\n## Комментарии\r\nХотел исправить koans, взял и исправил :-)\r\n","created_at":"2018-07-08T17:30:00Z","updated_at":"2018-07-10T20:48:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"927ec2d2f59dfd43e4c5a632003bd0b984469f94","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92/commits","review_comments_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92/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/92/comments","statuses_url":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/statuses/6996f1ead473466f558577aeaf76efdff7145677","head":{"label":"Evenstein:master","ref":"master","sha":"6996f1ead473466f558577aeaf76efdff7145677","user":{"login":"Evenstein","id":19613588,"node_id":"MDQ6VXNlcjE5NjEzNTg4","avatar_url":"https://avatars2.githubusercontent.com/u/19613588?v=4","gravatar_id":"","url":"https://api.github.com/users/Evenstein","html_url":"https://github.com/Evenstein","followers_url":"https://api.github.com/users/Evenstein/followers","following_url":"https://api.github.com/users/Evenstein/following{/other_user}","gists_url":"https://api.github.com/users/Evenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/Evenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evenstein/subscriptions","organizations_url":"https://api.github.com/users/Evenstein/orgs","repos_url":"https://api.github.com/users/Evenstein/repos","events_url":"https://api.github.com/users/Evenstein/events{/privacy}","received_events_url":"https://api.github.com/users/Evenstein/received_events","type":"User","site_admin":false},"repo":{"id":139882577,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4ODI1Nzc=","name":"summer-2018","full_name":"Evenstein/summer-2018","owner":{"login":"Evenstein","id":19613588,"node_id":"MDQ6VXNlcjE5NjEzNTg4","avatar_url":"https://avatars2.githubusercontent.com/u/19613588?v=4","gravatar_id":"","url":"https://api.github.com/users/Evenstein","html_url":"https://github.com/Evenstein","followers_url":"https://api.github.com/users/Evenstein/followers","following_url":"https://api.github.com/users/Evenstein/following{/other_user}","gists_url":"https://api.github.com/users/Evenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/Evenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evenstein/subscriptions","organizations_url":"https://api.github.com/users/Evenstein/orgs","repos_url":"https://api.github.com/users/Evenstein/repos","events_url":"https://api.github.com/users/Evenstein/events{/privacy}","received_events_url":"https://api.github.com/users/Evenstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Evenstein/summer-2018","description":null,"fork":true,"url":"https://api.github.com/repos/Evenstein/summer-2018","forks_url":"https://api.github.com/repos/Evenstein/summer-2018/forks","keys_url":"https://api.github.com/repos/Evenstein/summer-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Evenstein/summer-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Evenstein/summer-2018/teams","hooks_url":"https://api.github.com/repos/Evenstein/summer-2018/hooks","issue_events_url":"https://api.github.com/repos/Evenstein/summer-2018/issues/events{/number}","events_url":"https://api.github.com/repos/Evenstein/summer-2018/events","assignees_url":"https://api.github.com/repos/Evenstein/summer-2018/assignees{/user}","branches_url":"https://api.github.com/repos/Evenstein/summer-2018/branches{/branch}","tags_url":"https://api.github.com/repos/Evenstein/summer-2018/tags","blobs_url":"https://api.github.com/repos/Evenstein/summer-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Evenstein/summer-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Evenstein/summer-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/Evenstein/summer-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Evenstein/summer-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/Evenstein/summer-2018/languages","stargazers_url":"https://api.github.com/repos/Evenstein/summer-2018/stargazers","contributors_url":"https://api.github.com/repos/Evenstein/summer-2018/contributors","subscribers_url":"https://api.github.com/repos/Evenstein/summer-2018/subscribers","subscription_url":"https://api.github.com/repos/Evenstein/summer-2018/subscription","commits_url":"https://api.github.com/repos/Evenstein/summer-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/Evenstein/summer-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/Evenstein/summer-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/Evenstein/summer-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/Evenstein/summer-2018/contents/{+path}","compare_url":"https://api.github.com/repos/Evenstein/summer-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Evenstein/summer-2018/merges","archive_url":"https://api.github.com/repos/Evenstein/summer-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Evenstein/summer-2018/downloads","issues_url":"https://api.github.com/repos/Evenstein/summer-2018/issues{/number}","pulls_url":"https://api.github.com/repos/Evenstein/summer-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/Evenstein/summer-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/Evenstein/summer-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Evenstein/summer-2018/labels{/name}","releases_url":"https://api.github.com/repos/Evenstein/summer-2018/releases{/id}","deployments_url":"https://api.github.com/repos/Evenstein/summer-2018/deployments","created_at":"2018-07-05T17:46:22Z","updated_at":"2018-07-10T20:47:51Z","pushed_at":"2018-07-10T20:47:49Z","git_url":"git://github.com/Evenstein/summer-2018.git","ssh_url":"git@github.com:Evenstein/summer-2018.git","clone_url":"https://github.com/Evenstein/summer-2018.git","svn_url":"https://github.com/Evenstein/summer-2018","homepage":null,"size":68,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"c99fdfda9ff36e7b140393ab9a51b021dec0c9d8","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-10T20:10:25Z","pushed_at":"2018-07-10T20:47:51Z","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":86336,"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":56,"mirror_url":null,"archived":false,"open_issues_count":28,"license":null,"forks":56,"open_issues":28,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92"},"html":{"href":"https://github.com/rubizza-survival-camp/summer-2018/pull/92"},"issue":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/92"},"comments":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/pulls/92/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/92/commits"},"statuses":{"href":"https://api.github.com/repos/rubizza-survival-camp/summer-2018/statuses/6996f1ead473466f558577aeaf76efdff7145677"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}