google-cloud-dns 0.30.1 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +7 -27
- data/CHANGELOG.md +32 -0
- data/CONTRIBUTING.md +1 -1
- data/LOGGING.md +1 -1
- data/OVERVIEW.md +7 -7
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-dns.rb +2 -0
- data/lib/google/cloud/dns.rb +19 -7
- data/lib/google/cloud/dns/service.rb +4 -1
- data/lib/google/cloud/dns/version.rb +1 -1
- metadata +28 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f6518197855c27a23220e5a81d5a9cea9ed84d0ae54afe5dd38cd0b9221b81
|
4
|
+
data.tar.gz: 6f0c9c6c2646eefeaf66562f11f0aa11542d4c4446950520d116f60fd2e94ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89333f4bc5710c57308260be23d3fab1080f3b6f9e1aafdad95994544261d9bb89bd65fa62c2609eb2e454a2aac6557b2b711b739e07a71c1e3e1faaa4fe0f5a
|
7
|
+
data.tar.gz: d098c967d5afd436c5c45fc8a8c37c8efe08dfc57b78343c7516cd26965e11c8d504678a4eeae53bf20cc6e499d9078d88282faf7a8e7d92d648372670e4dc81
|
data/AUTHENTICATION.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
In general, the google-cloud-dns library uses [Service
|
4
4
|
Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
|
5
|
-
credentials to connect to Google Cloud services. When running on
|
5
|
+
credentials to connect to Google Cloud services. When running on Google Cloud
|
6
|
+
Platform (GCP), including Google Compute Engine (GCE), Google Kubernetes Engine
|
7
|
+
(GKE), Google App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run,
|
6
8
|
the credentials will be discovered automatically. When running on other
|
7
9
|
environments, the Service Account credentials can be specified by providing the
|
8
10
|
path to the [JSON
|
@@ -35,32 +37,10 @@ providing **Project ID** and **Service Account Credentials** directly in code.
|
|
35
37
|
|
36
38
|
### Google Cloud Platform environments
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
should be written as if already authenticated.
|
42
|
-
GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
|
43
|
-
access. For example:
|
44
|
-
|
45
|
-
* **All APIs**
|
46
|
-
* `https://www.googleapis.com/auth/cloud-platform`
|
47
|
-
* `https://www.googleapis.com/auth/cloud-platform.read-only`
|
48
|
-
* **BigQuery**
|
49
|
-
* `https://www.googleapis.com/auth/bigquery`
|
50
|
-
* `https://www.googleapis.com/auth/bigquery.insertdata`
|
51
|
-
* **Compute Engine**
|
52
|
-
* `https://www.googleapis.com/auth/compute`
|
53
|
-
* **Datastore**
|
54
|
-
* `https://www.googleapis.com/auth/datastore`
|
55
|
-
* `https://www.googleapis.com/auth/userinfo.email`
|
56
|
-
* **DNS**
|
57
|
-
* `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
|
58
|
-
* **Pub/Sub**
|
59
|
-
* `https://www.googleapis.com/auth/pubsub`
|
60
|
-
* **Storage**
|
61
|
-
* `https://www.googleapis.com/auth/devstorage.full_control`
|
62
|
-
* `https://www.googleapis.com/auth/devstorage.read_only`
|
63
|
-
* `https://www.googleapis.com/auth/devstorage.read_write`
|
40
|
+
When running on Google Cloud Platform (GCP), including Google Compute Engine (GCE),
|
41
|
+
Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud Functions
|
42
|
+
(GCF) and Cloud Run, the **Project ID** and **Credentials** and are discovered
|
43
|
+
automatically. Code should be written as if already authenticated.
|
64
44
|
|
65
45
|
### Environment Variables
|
66
46
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.33.0 / 2020-09-16
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* quota_project can be set via library configuration ([#7628](https://www.github.com/googleapis/google-cloud-ruby/issues/7628))
|
8
|
+
|
9
|
+
### 0.32.1 / 2020-05-28
|
10
|
+
|
11
|
+
#### Documentation
|
12
|
+
|
13
|
+
* Fix a few broken links
|
14
|
+
|
15
|
+
### 0.32.0 / 2019-10-29
|
16
|
+
|
17
|
+
This release requires Ruby 2.4 or later.
|
18
|
+
|
19
|
+
#### Documentation
|
20
|
+
|
21
|
+
* Clarify which Google Cloud Platform products support automatic authentication
|
22
|
+
|
23
|
+
### 0.31.0 / 2019-10-01
|
24
|
+
|
25
|
+
#### Features
|
26
|
+
|
27
|
+
* Support overriding of service endpoint
|
28
|
+
|
29
|
+
### 0.30.2 / 2019-08-23
|
30
|
+
|
31
|
+
#### Documentation
|
32
|
+
|
33
|
+
* Update documentation
|
34
|
+
|
3
35
|
### 0.30.1 / 2019-07-15
|
4
36
|
|
5
37
|
* Ensure use of a sufficiently recent REST client with the correct endpoint.
|
data/CONTRIBUTING.md
CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
|
|
24
24
|
In order to use the google-cloud-dns console and run the project's tests,
|
25
25
|
there is a small amount of setup:
|
26
26
|
|
27
|
-
1. Install Ruby. google-cloud-dns requires Ruby 2.
|
27
|
+
1. Install Ruby. google-cloud-dns requires Ruby 2.4+. You may choose to
|
28
28
|
manage your Ruby and gem installations with [RVM](https://rvm.io/),
|
29
29
|
[rbenv](https://github.com/rbenv/rbenv), or
|
30
30
|
[chruby](https://github.com/postmodern/chruby).
|
data/LOGGING.md
CHANGED
@@ -6,7 +6,7 @@ Client](https://github.com/google/google-api-ruby-client/blob/master/README.md#l
|
|
6
6
|
library. The logger that you set may be a Ruby stdlib
|
7
7
|
[`Logger`](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html) as
|
8
8
|
shown below, or a
|
9
|
-
[`Google::Cloud::Logging::Logger`](https://googleapis.
|
9
|
+
[`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
10
10
|
that will write logs to [Stackdriver
|
11
11
|
Logging](https://cloud.google.com/logging/).
|
12
12
|
|
data/OVERVIEW.md
CHANGED
@@ -7,13 +7,13 @@ be used to easily publish and manage DNS records using the same
|
|
7
7
|
infrastructure relied upon by Google. To learn more, read [What is Google
|
8
8
|
Cloud DNS?](https://cloud.google.com/dns/what-is-cloud-dns).
|
9
9
|
|
10
|
-
The goal of google-cloud is to provide an API that is comfortable to
|
11
|
-
|
12
|
-
|
13
|
-
App Engine
|
14
|
-
configure authentication easily, either directly in
|
15
|
-
environment variables. Read more about the options for
|
16
|
-
{file:AUTHENTICATION.md Authentication Guide}.
|
10
|
+
The goal of google-cloud is to provide an API that is comfortable to Rubyists.
|
11
|
+
Your authentication credentials are detected automatically in Google Cloud
|
12
|
+
Platform (GCP), including Google Compute Engine (GCE), Google Kubernetes Engine
|
13
|
+
(GKE), Google App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run. In
|
14
|
+
other environments you can configure authentication easily, either directly in
|
15
|
+
your code or via environment variables. Read more about the options for
|
16
|
+
connecting in the {file:AUTHENTICATION.md Authentication Guide}.
|
17
17
|
|
18
18
|
## Creating Zones
|
19
19
|
|
data/TROUBLESHOOTING.md
CHANGED
@@ -24,14 +24,8 @@ improved, *please* create a new issue on GitHub so we can talk about it.
|
|
24
24
|
|
25
25
|
- [New issue][gh-ruby]
|
26
26
|
|
27
|
-
Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
|
28
|
-
can use the "ruby" channel for general Ruby questions, or use the
|
29
|
-
"google-cloud-ruby" channel if you have questions about this gem in particular.
|
30
|
-
|
31
27
|
[so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+dns
|
32
28
|
|
33
|
-
[gh-search-ruby]: https://github.com/
|
34
|
-
|
35
|
-
[gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
|
29
|
+
[gh-search-ruby]: https://github.com/googleapis/google-cloud-ruby/issues?q=label%3A%22api%3A+dns%22
|
36
30
|
|
37
|
-
[
|
31
|
+
[gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
|
data/lib/google-cloud-dns.rb
CHANGED
@@ -130,6 +130,8 @@ Google::Cloud.configure.add_config! :dns do |config|
|
|
130
130
|
allow_nil: true
|
131
131
|
config.add_alias! :keyfile, :credentials
|
132
132
|
config.add_field! :scope, nil, match: [String, Array]
|
133
|
+
config.add_field! :quota_project, nil, match: String
|
133
134
|
config.add_field! :retries, nil, match: Integer
|
134
135
|
config.add_field! :timeout, nil, match: Integer
|
136
|
+
config.add_field! :endpoint, nil, match: String
|
135
137
|
end
|
data/lib/google/cloud/dns.rb
CHANGED
@@ -56,6 +56,8 @@ module Google
|
|
56
56
|
# @param [Integer] retries Number of times to retry requests on server
|
57
57
|
# error. The default value is `3`. Optional.
|
58
58
|
# @param [Integer] timeout Default timeout to use in requests. Optional.
|
59
|
+
# @param [String] endpoint Override of the endpoint host name. Optional.
|
60
|
+
# If the param is nil, uses the default endpoint.
|
59
61
|
# @param [String] project Alias for the `project_id` argument. Deprecated.
|
60
62
|
# @param [String] keyfile Alias for the `credentials` argument.
|
61
63
|
# Deprecated.
|
@@ -73,26 +75,24 @@ module Google
|
|
73
75
|
# zone = dns.zone "example-com"
|
74
76
|
#
|
75
77
|
def self.new project_id: nil, credentials: nil, scope: nil, retries: nil,
|
76
|
-
timeout: nil, project: nil, keyfile: nil
|
77
|
-
project_id ||= (project || default_project_id)
|
78
|
+
timeout: nil, endpoint: nil, project: nil, keyfile: nil
|
78
79
|
scope ||= configure.scope
|
79
80
|
retries ||= configure.retries
|
80
81
|
timeout ||= configure.timeout
|
82
|
+
endpoint ||= configure.endpoint
|
81
83
|
credentials ||= (keyfile || default_credentials(scope: scope))
|
82
84
|
|
83
85
|
unless credentials.is_a? Google::Auth::Credentials
|
84
86
|
credentials = Dns::Credentials.new credentials, scope: scope
|
85
87
|
end
|
86
88
|
|
87
|
-
|
88
|
-
project_id ||= credentials.project_id
|
89
|
-
end
|
90
|
-
project_id = project_id.to_s # Always cast to a string
|
89
|
+
project_id = resolve_project_id(project_id || project, credentials)
|
91
90
|
raise ArgumentError, "project_id is missing" if project_id.empty?
|
92
91
|
|
93
92
|
Dns::Project.new(
|
94
93
|
Dns::Service.new(
|
95
|
-
project_id, credentials,
|
94
|
+
project_id, credentials,
|
95
|
+
retries: retries, timeout: timeout, host: endpoint, quota_project: configure.quota_project
|
96
96
|
)
|
97
97
|
)
|
98
98
|
end
|
@@ -113,6 +113,8 @@ module Google
|
|
113
113
|
# * `retries` - (Integer) Number of times to retry requests on server
|
114
114
|
# error.
|
115
115
|
# * `timeout` - (Integer) Default timeout to use in requests.
|
116
|
+
# * `endpoint` - (String) Override of the endpoint host name, or `nil`
|
117
|
+
# to use the default endpoint.
|
116
118
|
#
|
117
119
|
# @return [Google::Cloud::Config] The configuration object the
|
118
120
|
# Google::Cloud::Dns library uses.
|
@@ -138,6 +140,16 @@ module Google
|
|
138
140
|
Google::Cloud.configure.credentials ||
|
139
141
|
Dns::Credentials.default(scope: scope)
|
140
142
|
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# @private Resolve project.
|
146
|
+
def self.resolve_project_id given_project, credentials
|
147
|
+
project_id = given_project || default_project_id
|
148
|
+
if credentials.respond_to? :project_id
|
149
|
+
project_id ||= credentials.project_id
|
150
|
+
end
|
151
|
+
project_id.to_s # Always cast to a string
|
152
|
+
end
|
141
153
|
end
|
142
154
|
end
|
143
155
|
end
|
@@ -33,7 +33,8 @@ module Google
|
|
33
33
|
|
34
34
|
##
|
35
35
|
# Creates a new Service instance.
|
36
|
-
def initialize project, credentials,
|
36
|
+
def initialize project, credentials,
|
37
|
+
retries: nil, timeout: nil, host: nil, quota_project: nil
|
37
38
|
@project = project
|
38
39
|
@credentials = credentials
|
39
40
|
@service = API::DnsService.new
|
@@ -47,7 +48,9 @@ module Google
|
|
47
48
|
@service.request_options.header ||= {}
|
48
49
|
@service.request_options.header["x-goog-api-client"] = \
|
49
50
|
"gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Dns::VERSION}"
|
51
|
+
@service.request_options.quota_project = quota_project if quota_project
|
50
52
|
@service.authorization = @credentials.client
|
53
|
+
@service.root_url = host if host
|
51
54
|
end
|
52
55
|
|
53
56
|
def service
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -29,42 +29,30 @@ dependencies:
|
|
29
29
|
name: google-api-client
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 0.30.4
|
35
|
-
- - "<"
|
32
|
+
- - "~>"
|
36
33
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
34
|
+
version: '0.33'
|
38
35
|
type: :runtime
|
39
36
|
prerelease: false
|
40
37
|
version_requirements: !ruby/object:Gem::Requirement
|
41
38
|
requirements:
|
42
|
-
- - "
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: 0.30.4
|
45
|
-
- - "<"
|
39
|
+
- - "~>"
|
46
40
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
41
|
+
version: '0.33'
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: googleauth
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
51
45
|
requirements:
|
52
|
-
- - "
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.6.2
|
55
|
-
- - "<"
|
46
|
+
- - "~>"
|
56
47
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
48
|
+
version: '0.9'
|
58
49
|
type: :runtime
|
59
50
|
prerelease: false
|
60
51
|
version_requirements: !ruby/object:Gem::Requirement
|
61
52
|
requirements:
|
62
|
-
- - "
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 0.6.2
|
65
|
-
- - "<"
|
53
|
+
- - "~>"
|
66
54
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
55
|
+
version: '0.9'
|
68
56
|
- !ruby/object:Gem::Dependency
|
69
57
|
name: zonefile
|
70
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,20 +67,34 @@ dependencies:
|
|
79
67
|
- - "~>"
|
80
68
|
- !ruby/object:Gem::Version
|
81
69
|
version: '1.04'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: google-style
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.24.0
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 1.24.0
|
82
84
|
- !ruby/object:Gem::Dependency
|
83
85
|
name: minitest
|
84
86
|
requirement: !ruby/object:Gem::Requirement
|
85
87
|
requirements:
|
86
88
|
- - "~>"
|
87
89
|
- !ruby/object:Gem::Version
|
88
|
-
version: '5.
|
90
|
+
version: '5.14'
|
89
91
|
type: :development
|
90
92
|
prerelease: false
|
91
93
|
version_requirements: !ruby/object:Gem::Requirement
|
92
94
|
requirements:
|
93
95
|
- - "~>"
|
94
96
|
- !ruby/object:Gem::Version
|
95
|
-
version: '5.
|
97
|
+
version: '5.14'
|
96
98
|
- !ruby/object:Gem::Dependency
|
97
99
|
name: minitest-autotest
|
98
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,20 +165,6 @@ dependencies:
|
|
163
165
|
- - "~>"
|
164
166
|
- !ruby/object:Gem::Version
|
165
167
|
version: '3.0'
|
166
|
-
- !ruby/object:Gem::Dependency
|
167
|
-
name: rubocop
|
168
|
-
requirement: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: 0.64.0
|
173
|
-
type: :development
|
174
|
-
prerelease: false
|
175
|
-
version_requirements: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: 0.64.0
|
180
168
|
- !ruby/object:Gem::Dependency
|
181
169
|
name: simplecov
|
182
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -262,14 +250,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
250
|
requirements:
|
263
251
|
- - ">="
|
264
252
|
- !ruby/object:Gem::Version
|
265
|
-
version: 2.
|
253
|
+
version: '2.4'
|
266
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
255
|
requirements:
|
268
256
|
- - ">="
|
269
257
|
- !ruby/object:Gem::Version
|
270
258
|
version: '0'
|
271
259
|
requirements: []
|
272
|
-
rubygems_version: 3.
|
260
|
+
rubygems_version: 3.1.4
|
273
261
|
signing_key:
|
274
262
|
specification_version: 4
|
275
263
|
summary: API Client library for Google Cloud DNS
|