{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/comments/166441573","pull_request_review_id":94503980,"id":166441573,"diff_hunk":"@@ -0,0 +1,79 @@\n+# Copyright 2018 Google LLC\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     https://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+require \"minitest/autorun\"\n+require \"minitest/spec\"\n+\n+require \"google/cloud/vision\"\n+\n+describe \"ImageAnnotatorFeatureMethods\" do\n+  it \"detects faces using GCS\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.face_detection(\n+      \"gs://gapic-toolkit/President_Barack_Obama.jpg\"\n+    )\n+    assert(response.face_annotations.size >= 1)\n+  end\n+\n+  it \"detects text from a local image\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.text_detection(\"acceptance/data/text.png\")\n+    assert(response.text_annotations.size >= 5)\n+    assert(\n+      response.full_text_annotation.text.include?(\n+        \"Google Cloud Client Library for Ruby\"\n+      )\n+    )\n+  end\n+\n+  it \"detects a landmark from a local image\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.landmark_detection(\n+      \"acceptance/data/landmark.jpg\"\n+    )\n+    assert(response.landmark_annotations.size >= 1)\n+    assert(\n+      response.landmark_annotations.map(&:description).include?(\n+        \"Mount Rushmore\"\n+      )\n+    )\n+  end\n+\n+  it \"detects a face from a local image\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.face_detection(\"acceptance/data/face.jpg\")\n+    assert(response.face_annotations.size >= 1)\n+  end\n+\n+  it \"detects a logo from a local image\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.logo_detection(\"acceptance/data/logo.jpg\")\n+    assert(response.logo_annotations.size >= 1)\n+    assert(\n+      response.logo_annotations.map(&:description).include?(\n+        \"Google\"\n+      )\n+    )\n+  end\n+\n+  it \"detects multiple features\" do\n+    image_annotator_client = Google::Cloud::Vision.new\n+    response = image_annotator_client.annotate_image(","path":"google-cloud-vision/acceptance/google/cloud/vision/v1/image_annotator_feature_methods_test.rb","position":72,"original_position":72,"commit_id":"51c338ce5bb51d686abda5478904df05e396f118","original_commit_id":"51c338ce5bb51d686abda5478904df05e396f118","user":{"login":"remi","id":280,"avatar_url":"https://avatars0.githubusercontent.com/u/280?v=4","gravatar_id":"","url":"https://api.github.com/users/remi","html_url":"https://github.com/remi","followers_url":"https://api.github.com/users/remi/followers","following_url":"https://api.github.com/users/remi/following{/other_user}","gists_url":"https://api.github.com/users/remi/gists{/gist_id}","starred_url":"https://api.github.com/users/remi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remi/subscriptions","organizations_url":"https://api.github.com/users/remi/orgs","repos_url":"https://api.github.com/users/remi/repos","events_url":"https://api.github.com/users/remi/events{/privacy}","received_events_url":"https://api.github.com/users/remi/received_events","type":"User","site_admin":false},"body":"Can I pass a list of desired features to this method?\r\n\r\nWhat does that syntax look like (and can a test be added showing it?)","created_at":"2018-02-06T21:06:31Z","updated_at":"2018-02-06T21:06:31Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959#discussion_r166441573","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/comments/166441573"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959#discussion_r166441573"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959","id":166937909,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/1959","number":1959,"state":"open","locked":false,"title":"Replace manual Vision library with GAPIC and helpers","user":{"login":"geigerj","id":14222439,"avatar_url":"https://avatars3.githubusercontent.com/u/14222439?v=4","gravatar_id":"","url":"https://api.github.com/users/geigerj","html_url":"https://github.com/geigerj","followers_url":"https://api.github.com/users/geigerj/followers","following_url":"https://api.github.com/users/geigerj/following{/other_user}","gists_url":"https://api.github.com/users/geigerj/gists{/gist_id}","starred_url":"https://api.github.com/users/geigerj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geigerj/subscriptions","organizations_url":"https://api.github.com/users/geigerj/orgs","repos_url":"https://api.github.com/users/geigerj/repos","events_url":"https://api.github.com/users/geigerj/events{/privacy}","received_events_url":"https://api.github.com/users/geigerj/received_events","type":"User","site_admin":false},"body":"This PR replaces the existing Vision client library with an\r\nautogenerated library supplemented with helpers, following the reference\r\nof [NodeJS](https://github.com/googleapis/nodejs-vision) and\r\n[Python](https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/vision).\r\nAs such, it substantially changes the public surface.\r\n\r\n(See also #1828 for analogous change to Language.)\r\n\r\ncc: @jbolinger @lukesneeringer ","created_at":"2018-02-03T01:25:25Z","updated_at":"2018-02-06T21:06:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6dba5ee7f6a3892736d82bd4dd6a955880b6fcc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"quartzmo","id":205445,"avatar_url":"https://avatars3.githubusercontent.com/u/205445?v=4","gravatar_id":"","url":"https://api.github.com/users/quartzmo","html_url":"https://github.com/quartzmo","followers_url":"https://api.github.com/users/quartzmo/followers","following_url":"https://api.github.com/users/quartzmo/following{/other_user}","gists_url":"https://api.github.com/users/quartzmo/gists{/gist_id}","starred_url":"https://api.github.com/users/quartzmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quartzmo/subscriptions","organizations_url":"https://api.github.com/users/quartzmo/orgs","repos_url":"https://api.github.com/users/quartzmo/repos","events_url":"https://api.github.com/users/quartzmo/events{/privacy}","received_events_url":"https://api.github.com/users/quartzmo/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/1959/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/statuses/51c338ce5bb51d686abda5478904df05e396f118","head":{"label":"geigerj:no-20","ref":"no-20","sha":"51c338ce5bb51d686abda5478904df05e396f118","user":{"login":"geigerj","id":14222439,"avatar_url":"https://avatars3.githubusercontent.com/u/14222439?v=4","gravatar_id":"","url":"https://api.github.com/users/geigerj","html_url":"https://github.com/geigerj","followers_url":"https://api.github.com/users/geigerj/followers","following_url":"https://api.github.com/users/geigerj/following{/other_user}","gists_url":"https://api.github.com/users/geigerj/gists{/gist_id}","starred_url":"https://api.github.com/users/geigerj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geigerj/subscriptions","organizations_url":"https://api.github.com/users/geigerj/orgs","repos_url":"https://api.github.com/users/geigerj/repos","events_url":"https://api.github.com/users/geigerj/events{/privacy}","received_events_url":"https://api.github.com/users/geigerj/received_events","type":"User","site_admin":false},"repo":{"id":90295385,"name":"google-cloud-ruby","full_name":"geigerj/google-cloud-ruby","owner":{"login":"geigerj","id":14222439,"avatar_url":"https://avatars3.githubusercontent.com/u/14222439?v=4","gravatar_id":"","url":"https://api.github.com/users/geigerj","html_url":"https://github.com/geigerj","followers_url":"https://api.github.com/users/geigerj/followers","following_url":"https://api.github.com/users/geigerj/following{/other_user}","gists_url":"https://api.github.com/users/geigerj/gists{/gist_id}","starred_url":"https://api.github.com/users/geigerj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geigerj/subscriptions","organizations_url":"https://api.github.com/users/geigerj/orgs","repos_url":"https://api.github.com/users/geigerj/repos","events_url":"https://api.github.com/users/geigerj/events{/privacy}","received_events_url":"https://api.github.com/users/geigerj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geigerj/google-cloud-ruby","description":"Google Cloud Client Library for Ruby","fork":true,"url":"https://api.github.com/repos/geigerj/google-cloud-ruby","forks_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/forks","keys_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/teams","hooks_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/hooks","issue_events_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/events","assignees_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/tags","blobs_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/languages","stargazers_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/stargazers","contributors_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/contributors","subscribers_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/subscribers","subscription_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/subscription","commits_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/merges","archive_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/downloads","issues_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/labels{/name}","releases_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/geigerj/google-cloud-ruby/deployments","created_at":"2017-05-04T18:18:57Z","updated_at":"2017-09-13T17:25:16Z","pushed_at":"2018-02-05T21:41:26Z","git_url":"git://github.com/geigerj/google-cloud-ruby.git","ssh_url":"git@github.com:geigerj/google-cloud-ruby.git","clone_url":"https://github.com/geigerj/google-cloud-ruby.git","svn_url":"https://github.com/geigerj/google-cloud-ruby","homepage":"https://googlecloudplatform.github.io/google-cloud-ruby/","size":27776,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"b6fc30a9147ec4db1a1c141e64939fa7ffd0cad5","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20343475,"name":"google-cloud-ruby","full_name":"GoogleCloudPlatform/google-cloud-ruby","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby","description":"Google Cloud Client Library for Ruby","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/deployments","created_at":"2014-05-30T21:47:14Z","updated_at":"2018-02-06T06:42:01Z","pushed_at":"2018-02-06T16:58:56Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-ruby.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-ruby.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-ruby","homepage":"https://googlecloudplatform.github.io/google-cloud-ruby/","size":31189,"stargazers_count":443,"watchers_count":443,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":176,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":176,"open_issues":34,"watchers":443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-ruby/pull/1959"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/1959"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/issues/1959/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/pulls/1959/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-ruby/statuses/51c338ce5bb51d686abda5478904df05e396f118"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"remi"}}