google-cloud-dns 0.30.0 → 0.32.1
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 +31 -1
- 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 +1 -0
- data/lib/google/cloud/dns.rb +19 -7
- data/lib/google/cloud/dns/service.rb +3 -1
- data/lib/google/cloud/dns/version.rb +1 -1
- metadata +26 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be5ff667872b4eb2cc744f059ea546eb227260645a0ddacc01c7473668af0007
|
4
|
+
data.tar.gz: a84d0b209261fc68349bd7396f4966829fd023489914f20998964b24c024ed5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 635a2bede07e63fa69d3677da8d601d56bfe3786e7499150dd7aa9d80439d28cb3af4764f58e7025d462e98c2fc5ce503972896778d88383b33f5654c77cbab7
|
7
|
+
data.tar.gz: 573b1a47063ebe1dafa2293e0c9af61397ff900f783ed2aa1698cd400fa492b835d664131bbf7a193b5b22d47bb21dd2b9ddeefd31ff5caa59550f09353b621e
|
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,35 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.32.1 / 2020-05-28
|
4
|
+
|
5
|
+
#### Documentation
|
6
|
+
|
7
|
+
* Fix a few broken links
|
8
|
+
|
9
|
+
### 0.32.0 / 2019-10-29
|
10
|
+
|
11
|
+
This release requires Ruby 2.4 or later.
|
12
|
+
|
13
|
+
#### Documentation
|
14
|
+
|
15
|
+
* Clarify which Google Cloud Platform products support automatic authentication
|
16
|
+
|
17
|
+
### 0.31.0 / 2019-10-01
|
18
|
+
|
19
|
+
#### Features
|
20
|
+
|
21
|
+
* Support overriding of service endpoint
|
22
|
+
|
23
|
+
### 0.30.2 / 2019-08-23
|
24
|
+
|
25
|
+
#### Documentation
|
26
|
+
|
27
|
+
* Update documentation
|
28
|
+
|
29
|
+
### 0.30.1 / 2019-07-15
|
30
|
+
|
31
|
+
* Ensure use of a sufficiently recent REST client with the correct endpoint.
|
32
|
+
|
3
33
|
### 0.30.0 / 2019-02-01
|
4
34
|
|
5
35
|
* Make use of Credentials#project_id
|
@@ -8,7 +38,7 @@
|
|
8
38
|
This value was added in googleauth 0.7.0.
|
9
39
|
* Loosen googleauth dependency
|
10
40
|
Allow for new releases up to 0.10.
|
11
|
-
The googleauth devs have committed to
|
41
|
+
The googleauth devs have committed to maintaining the current API
|
12
42
|
and will not make backwards compatible changes before 0.10.:
|
13
43
|
|
14
44
|
### 0.29.4 / 2018-09-20
|
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
@@ -132,4 +132,5 @@ Google::Cloud.configure.add_config! :dns do |config|
|
|
132
132
|
config.add_field! :scope, nil, match: [String, Array]
|
133
133
|
config.add_field! :retries, nil, match: Integer
|
134
134
|
config.add_field! :timeout, nil, match: Integer
|
135
|
+
config.add_field! :endpoint, nil, match: String
|
135
136
|
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
|
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
|
37
38
|
@project = project
|
38
39
|
@credentials = credentials
|
39
40
|
@service = API::DnsService.new
|
@@ -48,6 +49,7 @@ module Google
|
|
48
49
|
@service.request_options.header["x-goog-api-client"] = \
|
49
50
|
"gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Dns::VERSION}"
|
50
51
|
@service.authorization = @credentials.client
|
52
|
+
@service.root_url = host if host
|
51
53
|
end
|
52
54
|
|
53
55
|
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.32.1
|
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-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -31,34 +31,28 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0.
|
34
|
+
version: '0.33'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0.
|
41
|
+
version: '0.33'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: googleauth
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 0.6.2
|
49
|
-
- - "<"
|
46
|
+
- - "~>"
|
50
47
|
- !ruby/object:Gem::Version
|
51
|
-
version: 0.
|
48
|
+
version: '0.9'
|
52
49
|
type: :runtime
|
53
50
|
prerelease: false
|
54
51
|
version_requirements: !ruby/object:Gem::Requirement
|
55
52
|
requirements:
|
56
|
-
- - "
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: 0.6.2
|
59
|
-
- - "<"
|
53
|
+
- - "~>"
|
60
54
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
55
|
+
version: '0.9'
|
62
56
|
- !ruby/object:Gem::Dependency
|
63
57
|
name: zonefile
|
64
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,20 +67,34 @@ dependencies:
|
|
73
67
|
- - "~>"
|
74
68
|
- !ruby/object:Gem::Version
|
75
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
|
76
84
|
- !ruby/object:Gem::Dependency
|
77
85
|
name: minitest
|
78
86
|
requirement: !ruby/object:Gem::Requirement
|
79
87
|
requirements:
|
80
88
|
- - "~>"
|
81
89
|
- !ruby/object:Gem::Version
|
82
|
-
version: '5.
|
90
|
+
version: '5.14'
|
83
91
|
type: :development
|
84
92
|
prerelease: false
|
85
93
|
version_requirements: !ruby/object:Gem::Requirement
|
86
94
|
requirements:
|
87
95
|
- - "~>"
|
88
96
|
- !ruby/object:Gem::Version
|
89
|
-
version: '5.
|
97
|
+
version: '5.14'
|
90
98
|
- !ruby/object:Gem::Dependency
|
91
99
|
name: minitest-autotest
|
92
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,20 +165,6 @@ dependencies:
|
|
157
165
|
- - "~>"
|
158
166
|
- !ruby/object:Gem::Version
|
159
167
|
version: '3.0'
|
160
|
-
- !ruby/object:Gem::Dependency
|
161
|
-
name: rubocop
|
162
|
-
requirement: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 0.61.0
|
167
|
-
type: :development
|
168
|
-
prerelease: false
|
169
|
-
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 0.61.0
|
174
168
|
- !ruby/object:Gem::Dependency
|
175
169
|
name: simplecov
|
176
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,15 +250,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
256
250
|
requirements:
|
257
251
|
- - ">="
|
258
252
|
- !ruby/object:Gem::Version
|
259
|
-
version: 2.
|
253
|
+
version: '2.4'
|
260
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
261
255
|
requirements:
|
262
256
|
- - ">="
|
263
257
|
- !ruby/object:Gem::Version
|
264
258
|
version: '0'
|
265
259
|
requirements: []
|
266
|
-
|
267
|
-
rubygems_version: 2.7.6
|
260
|
+
rubygems_version: 3.0.6
|
268
261
|
signing_key:
|
269
262
|
specification_version: 4
|
270
263
|
summary: API Client library for Google Cloud DNS
|