AUTHENTICATION.md in google-cloud-vision-v1-0.1.4 vs AUTHENTICATION.md in google-cloud-vision-v1-0.1.5
- old
+ new
@@ -25,11 +25,11 @@
3. Initialize the client.
```ruby
require "google/cloud/vision/v1"
-client = Google::Cloud::Vision::V1::ProductSearch::Client.new
+client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
```
## Credential Lookup
The google-cloud-vision-v1 library aims to make authentication
@@ -62,11 +62,11 @@
**Credentials JSON** itself can be stored for environments such as Docker
containers where writing files is difficult or not encouraged.
The environment variables that google-cloud-vision-v1
checks for credentials are configured on the service Credentials class (such as
-{Google::Cloud::Vision::V1::ProductSearch::Credentials}):
+{::Google::Cloud::Vision::V1::ProductSearch::Credentials}):
1. `VISION_CREDENTIALS` - Path to JSON file, or JSON contents
2. `VISION_KEYFILE` - Path to JSON file, or JSON contents
3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
@@ -75,35 +75,35 @@
```ruby
require "google/cloud/vision/v1"
ENV["VISION_CREDENTIALS"] = "path/to/keyfile.json"
-client = Google::Cloud::Vision::V1::ProductSearch::Client.new
+client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
```
### Configuration
The **Credentials JSON** can be configured instead of placing them in
environment variables. Either on an individual client initialization:
```ruby
require "google/cloud/vision/v1"
-client = Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
+client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
config.credentials = "path/to/keyfile.json"
end
```
Or configured globally for all clients:
```ruby
require "google/cloud/vision/v1"
-Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
+::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
config.credentials = "path/to/keyfile.json"
end
-client = Google::Cloud::Vision::V1::ProductSearch::Client.new
+client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
```
### Cloud SDK
This option allows for an easy way to authenticate during development. If