google-cloud-dns 0.30.2 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 595489857ccfc57ee754e666f9feac8fb28f93122b3fb07ad065af95a6e7f7aa
4
- data.tar.gz: f00d600df85a0a0fc78c37d153c6e91ba0109749e6e613d9575af3be91756d54
3
+ metadata.gz: 479a5747afb3dcf0773e2aed9ee0c34082de7ca7321efaa943c295522b670a12
4
+ data.tar.gz: 25ec7fa5e1fbfd9e165b8d96f5909475c730e3ca41a116bdb5ba892a9228f213
5
5
  SHA512:
6
- metadata.gz: ddd01191f73978160528a4c239897dca2dbc9419a88d4f563ee9175706b6a808f237442f6a49366ac11666167da9ba0ad85d9568abd8092c57a02b9d825963d8
7
- data.tar.gz: 791d85c38cbc463cca62e2fde0125c41f034b59d54b4a14c6234d31f1e81a25ce10e75e3438752ac4e3fce7809059a3a4ebe417a347c5a5cd6a6e44c5c43a9a6
6
+ metadata.gz: 6576c0e8566f4e8f70a129fac30c0bef6991a9eb539a9a6c9e22f61952bf48941be2daf6719e5dabc12ca9e0d7e9fc95516c04508ef7ad7983674a44f8e46492
7
+ data.tar.gz: f316aaef3760f5950782468a14bdb1e1b0fb55c64aff178ac3654b9c5b90872ea7426c1d69a4b88584b5d0ee436596fc5e9796af33e2fe39f8c323395a7a67ef
@@ -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 Compute Engine
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
- While running on Google Cloud Platform environments such as Google Compute
39
- Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
40
- The **Project ID** and **Credentials** and are discovered automatically. Code
41
- should be written as if already authenticated. Just be sure when you [set up the
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
 
@@ -1,5 +1,37 @@
1
1
  # Release History
2
2
 
3
+ ### 0.34.0 / 2021-01-13
4
+
5
+ #### Features
6
+
7
+ * Replace google-api-client with google-apis-dns_v1
8
+
9
+ ### 0.33.0 / 2020-09-16
10
+
11
+ #### Features
12
+
13
+ * quota_project can be set via library configuration ([#7628](https://www.github.com/googleapis/google-cloud-ruby/issues/7628))
14
+
15
+ ### 0.32.1 / 2020-05-28
16
+
17
+ #### Documentation
18
+
19
+ * Fix a few broken links
20
+
21
+ ### 0.32.0 / 2019-10-29
22
+
23
+ This release requires Ruby 2.4 or later.
24
+
25
+ #### Documentation
26
+
27
+ * Clarify which Google Cloud Platform products support automatic authentication
28
+
29
+ ### 0.31.0 / 2019-10-01
30
+
31
+ #### Features
32
+
33
+ * Support overriding of service endpoint
34
+
3
35
  ### 0.30.2 / 2019-08-23
4
36
 
5
37
  #### Documentation
@@ -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.3+. You may choose to
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).
@@ -45,7 +45,7 @@ there is a small amount of setup:
45
45
 
46
46
  ```sh
47
47
  $ cd google-cloud-dns/
48
- $ bundle exec rake bundleupdate
48
+ $ bundle install
49
49
  ```
50
50
 
51
51
  ## Console
@@ -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
- Rubyists. Your authentication credentials are detected automatically in
12
- Google Cloud Platform environments such as Google Compute Engine, Google
13
- App Engine and Google Kubernetes Engine. In other environments you can
14
- configure authentication easily, either directly in your code or via
15
- environment variables. Read more about the options for connecting in the
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
 
@@ -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/googlecloudplatform/google-cloud-ruby/issues?q=label%3A%22api%3A+dns%22
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
- [slack-ruby]: https://gcp-slack.appspot.com/
31
+ [gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
@@ -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
@@ -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
- if credentials.respond_to? :project_id
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, retries: retries, timeout: timeout
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, retries: nil, timeout: nil
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
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Dns
19
- VERSION = "0.30.2".freeze
19
+ VERSION = "0.34.0".freeze
20
20
  end
21
21
  end
22
22
  end
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.30.2
4
+ version: 0.34.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: 2019-08-23 00:00:00.000000000 Z
12
+ date: 2021-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -26,45 +26,33 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.2'
28
28
  - !ruby/object:Gem::Dependency
29
- name: google-api-client
29
+ name: google-apis-dns_v1
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: '1.0'
34
+ version: '0.1'
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: '1.0'
41
+ version: '0.1'
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.10.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.10.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.10'
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.10'
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.0.0
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.0.4
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