Skip to content

Commit

Permalink
Migrate Vision to generated library (#2540)
Browse files Browse the repository at this point in the history
* Remove all hand-written code.
* Add migration guide link to README.
* Add migration guide link to post-install message.
  • Loading branch information
TheRoyalTnetennba authored and blowmage committed Nov 2, 2018
1 parent 31e0c97 commit 89410e4
Show file tree
Hide file tree
Showing 97 changed files with 4,978 additions and 15,198 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -884,12 +884,16 @@ $ gem install google-cloud-vision
```ruby
require "google/cloud/vision"

vision = Google::Cloud::Vision.new

image = vision.image "path/to/landmark.jpg"

landmark = image.landmark
landmark.description #=> "Mount Rushmore"
image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new
gcs_image_uri = "gs://gapic-toolkit/President_Barack_Obama.jpg"
source = { gcs_image_uri: gcs_image_uri }
image = { source: source }
type = :FACE_DETECTION
features_element = { type: type }
features = [features_element]
requests_element = { image: image, features: features }
requests = [requests_element]
response = image_annotator_client.batch_annotate_images(requests)
```

### Stackdriver Monitoring API (Beta)
Expand Down
15 changes: 0 additions & 15 deletions google-cloud-vision/.autotest

This file was deleted.

4 changes: 4 additions & 0 deletions google-cloud-vision/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ jsondoc/*

# Ignore YARD stuffs
.yardoc

# IDE settings
.idea
*.iml
10 changes: 3 additions & 7 deletions google-cloud-vision/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ AllCops:
- "lib/google/cloud/vision/v1.rb"
- "lib/google/cloud/vision/v1/**/*"
- "test/**/*"
- "lib/google/cloud/vision.rb"

Documentation:
Enabled: false
Expand All @@ -29,16 +30,11 @@ Metrics/ClassLength:
Enabled: false
Metrics/MethodLength:
Max: 26
Exclude:
- "lib/google/cloud/vision.rb"
Metrics/ParameterLists:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLines: # for the extra line between copyright and code
Enabled: false
Naming/FileName:
Exclude:
- "lib/google-cloud-vision.rb"
Naming/UncommunicativeMethodParamName:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
11 changes: 2 additions & 9 deletions google-cloud-vision/.yardopts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
--no-private
--title=Google Cloud Vision
--title=Cloud Vision API
--exclude _pb\.rb$
--markup markdown
--markup-provider redcarpet
--main OVERVIEW.md

./lib/**/*.rb
-
OVERVIEW.md
AUTHENTICATION.md
LOGGING.md
CONTRIBUTING.md
TROUBLESHOOTING.md
CHANGELOG.md
CODE_OF_CONDUCT.md
README.md
LICENSE
179 changes: 0 additions & 179 deletions google-cloud-vision/AUTHENTICATION.md

This file was deleted.

40 changes: 0 additions & 40 deletions google-cloud-vision/CODE_OF_CONDUCT.md

This file was deleted.

Loading

0 comments on commit 89410e4

Please sign in to comment.