google-cloud-resource_manager 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +1 -1
- data/lib/google/cloud/resource_manager/credentials.rb +11 -12
- data/lib/google/cloud/resource_manager/policy.rb +2 -1
- data/lib/google/cloud/resource_manager/project/list.rb +3 -3
- data/lib/google/cloud/resource_manager/project/updater.rb +1 -7
- data/lib/google/cloud/resource_manager/service.rb +1 -1
- data/lib/google/cloud/resource_manager/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62941a3675ba5cb0953539c4d95d1777fd71ba23efb651b4400e61368570bba2
|
4
|
+
data.tar.gz: 928aacc4f30033e6ea35f50b6be926093c3854ae8956cb6dee67be2b6ca39150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d2e7251de2e5a25815b285963216eebb8f2c8c4a354ba49c9ab9ec349e0455d954ad14dc8a80423f0d22df8c3ed853c53710cf5739e2bbbf290894dd3585f7
|
7
|
+
data.tar.gz: b99249da50ed012f5d224015635f372a9888de6cacaf5cb5b60d720aaebe38e3367af941c33062eff262f816ecee8cf6f9a1e6274be3bba5f6c06dcc272c4eff
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
|
|
24
24
|
In order to use the google-cloud-resource_manager console and run the project's
|
25
25
|
tests, there is a small amount of setup:
|
26
26
|
|
27
|
-
1. Install Ruby. google-cloud-resource_manager requires Ruby 2.
|
27
|
+
1. Install Ruby. google-cloud-resource_manager requires Ruby 2.5+. You may
|
28
28
|
choose to 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).
|
@@ -36,18 +36,17 @@ module Google
|
|
36
36
|
#
|
37
37
|
class Credentials < Google::Auth::Credentials
|
38
38
|
SCOPE = ["https://www.googleapis.com/auth/cloud-platform"].freeze
|
39
|
-
PATH_ENV_VARS =
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
JSON_ENV_VARS =
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
DEFAULT_PATHS =
|
50
|
-
["~/.config/gcloud/application_default_credentials.json"].freeze
|
39
|
+
PATH_ENV_VARS = ["RESOURCE_MANAGER_CREDENTIALS",
|
40
|
+
"RESOURCE_MANAGER_KEYFILE",
|
41
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
42
|
+
"GOOGLE_CLOUD_KEYFILE",
|
43
|
+
"GCLOUD_KEYFILE"].freeze
|
44
|
+
JSON_ENV_VARS = ["RESOURCE_MANAGER_CREDENTIALS_JSON",
|
45
|
+
"RESOURCE_MANAGER_KEYFILE_JSON",
|
46
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
47
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
48
|
+
"GCLOUD_KEYFILE_JSON"].freeze
|
49
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"].freeze
|
51
50
|
end
|
52
51
|
end
|
53
52
|
end
|
@@ -122,17 +122,17 @@ module Google
|
|
122
122
|
# puts project.project_id
|
123
123
|
# end
|
124
124
|
#
|
125
|
-
def all request_limit: nil
|
125
|
+
def all request_limit: nil, &block
|
126
126
|
request_limit = request_limit.to_i if request_limit
|
127
127
|
unless block_given?
|
128
128
|
return enum_for :all, request_limit: request_limit
|
129
129
|
end
|
130
130
|
results = self
|
131
131
|
loop do
|
132
|
-
results.each
|
132
|
+
results.each(&block)
|
133
133
|
if request_limit
|
134
134
|
request_limit -= 1
|
135
|
-
break if request_limit
|
135
|
+
break if request_limit.negative?
|
136
136
|
end
|
137
137
|
break unless results.next?
|
138
138
|
results = results.next
|
@@ -37,12 +37,6 @@ module Google
|
|
37
37
|
# end
|
38
38
|
#
|
39
39
|
class Updater < DelegateClass(Project)
|
40
|
-
##
|
41
|
-
# @private Create an Updater object.
|
42
|
-
def initialize project
|
43
|
-
super project
|
44
|
-
end
|
45
|
-
|
46
40
|
##
|
47
41
|
# Updates the user-assigned name of the project. This field is
|
48
42
|
# optional and can remain unset.
|
@@ -146,7 +140,7 @@ module Google
|
|
146
140
|
##
|
147
141
|
# @private Create an Updater object.
|
148
142
|
def self.from_project project
|
149
|
-
dupe_gapi = project.gapi.class.new
|
143
|
+
dupe_gapi = project.gapi.class.new(**project.gapi.to_h)
|
150
144
|
dupe_project = Project.from_gapi dupe_gapi, nil # no way to update
|
151
145
|
Updater.new dupe_project
|
152
146
|
end
|
@@ -81,7 +81,7 @@ module Google
|
|
81
81
|
project_attrs = {
|
82
82
|
project_id: project_id, name: name, labels: labels, parent: parent
|
83
83
|
}.delete_if { |_, v| v.nil? }
|
84
|
-
execute { service.create_project API::Project.new(project_attrs) }
|
84
|
+
execute { service.create_project API::Project.new(**project_attrs) }
|
85
85
|
end
|
86
86
|
|
87
87
|
##
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-resource_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.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: 2021-
|
12
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -59,28 +59,28 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
62
|
+
version: 1.25.1
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.
|
69
|
+
version: 1.25.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: minitest
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '5.
|
76
|
+
version: '5.14'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '5.
|
83
|
+
version: '5.14'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: minitest-autotest
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,14 +234,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
234
|
requirements:
|
235
235
|
- - ">="
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: '2.
|
237
|
+
version: '2.5'
|
238
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
239
|
requirements:
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.2.13
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: API Client library for Google Cloud Resource Manager
|