fog-google 1.15.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fog.example +1 -1
- data/.github/scripts/setup_creds.sh +10 -0
- data/.github/workflows/integration.yml +225 -0
- data/.github/workflows/stale.yml +1 -1
- data/.github/workflows/unit.yml +26 -0
- data/CHANGELOG.md +52 -0
- data/README.md +12 -11
- data/fog-google.gemspec +12 -4
- data/lib/fog/compute/google/models/address.rb +0 -0
- data/lib/fog/compute/google/models/addresses.rb +0 -0
- data/lib/fog/compute/google/models/images.rb +3 -2
- data/lib/fog/compute/google/models/network.rb +1 -1
- data/lib/fog/compute/google/models/region.rb +0 -0
- data/lib/fog/compute/google/models/regions.rb +0 -0
- data/lib/fog/compute/google/models/server.rb +7 -0
- data/lib/fog/compute/google/models/servers.rb +4 -1
- data/lib/fog/compute/google/models/subnetwork.rb +0 -0
- data/lib/fog/compute/google/requests/get_region.rb +0 -0
- data/lib/fog/compute/google/requests/insert_network.rb +1 -11
- data/lib/fog/compute/google/requests/insert_server.rb +4 -0
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/models/file.rb +10 -1
- data/lib/fog/storage/google_json/models/files.rb +10 -4
- data/lib/fog/storage/google_json/real.rb +4 -4
- data/lib/fog/storage/google_json/requests/get_object_url.rb +2 -2
- data/lib/fog/storage/google_xml/requests/get_object.rb +2 -2
- data/test/helpers/integration_test_helper.rb +2 -2
- data/test/helpers/test_helper.rb +7 -3
- data/test/integration/compute/core_compute/test_servers.rb +2 -2
- data/test/integration/compute/core_networking/test_networks.rb +0 -11
- data/test/integration/factories/networks_factory.rb +4 -6
- metadata +101 -31
- data/.github/workflows/ruby.yml +0 -34
- data/ci/.gitignore +0 -1
- data/ci/README.md +0 -65
- data/ci/build-head-pipeline.yml +0 -173
- data/ci/credentials.yml.template +0 -28
- data/ci/docker-image/Dockerfile +0 -18
- data/ci/integration-pipeline.yml +0 -226
- data/ci/pipeline-dev.yml +0 -58
- data/ci/tasks/run-int.sh +0 -53
- data/ci/tasks/run-int.yml +0 -18
- data/ci/tasks/utils.sh +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b20ba5a737cfb13ade212b613d28434757226a2a24295df02d6ef4ed1af63a8
|
4
|
+
data.tar.gz: daf53527899f7503f46183047024dc875102d7ac6be02959ef1fc428a0669fae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cb2f67935fcb561acc870217144d9077bef88732155e0542bb1c06dd6d342c44ed00c702a05f30d5a3c87072080a2f3220e23d1490b8133c144977aa59dd3a1
|
7
|
+
data.tar.gz: c34b0c89d323619d80e1d95a278b4e5895aa5735ec4d0739f80d72e49bbd9bb2095e4248bd20698b122ab659baccbb963f195b06d1ff4d5232279912f1901b81
|
data/.fog.example
CHANGED
@@ -22,4 +22,4 @@ my_google_credentials:
|
|
22
22
|
#google_storage_access_key_id: GOOGXXXXXXXXXXXXXXXX
|
23
23
|
#google_storage_secret_access_key: XXXX+XXX/XXXXXXXX+XXXXXXXXXXXXXXXXXXXXX
|
24
24
|
# /END GOOGLE CONFIG
|
25
|
-
#################################################################
|
25
|
+
#################################################################
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
GOOGLE_PROJECT=$(curl "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
|
4
|
+
|
5
|
+
# fog needs the google project to be specified even if it uses application-default creds
|
6
|
+
cat >~/.fog <<EOL
|
7
|
+
test:
|
8
|
+
google_project: ${GOOGLE_PROJECT}
|
9
|
+
google_application_default: true
|
10
|
+
EOL
|
@@ -0,0 +1,225 @@
|
|
1
|
+
name: integration-tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
types: [ assigned, opened, synchronize, reopened, labeled ]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
test-compute-core:
|
12
|
+
runs-on: self-hosted
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
16
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
17
|
+
max-parallel: 1
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2.4.0
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
env:
|
24
|
+
# Needs to be set up for self-hosted runners, see:
|
25
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
26
|
+
# Image used in runners: summerwind/actions-runner
|
27
|
+
ImageOS: ubuntu20
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby-version }}
|
30
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
|
+
- name: Install dependencies
|
32
|
+
run: bundle install
|
33
|
+
- name: Run tests
|
34
|
+
run: >-
|
35
|
+
./.github/scripts/setup_creds.sh &&
|
36
|
+
bundle exec rake test:compute-core_compute
|
37
|
+
|
38
|
+
test-compute-networking:
|
39
|
+
runs-on: self-hosted
|
40
|
+
strategy:
|
41
|
+
matrix:
|
42
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
43
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
44
|
+
max-parallel: 1
|
45
|
+
|
46
|
+
steps:
|
47
|
+
- uses: actions/checkout@v2.4.0
|
48
|
+
- name: Set up Ruby
|
49
|
+
uses: ruby/setup-ruby@v1
|
50
|
+
env:
|
51
|
+
# Needs to be set up for self-hosted runners, see:
|
52
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
53
|
+
# Image used in runners: summerwind/actions-runner
|
54
|
+
ImageOS: ubuntu20
|
55
|
+
with:
|
56
|
+
ruby-version: ${{ matrix.ruby-version }}
|
57
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
58
|
+
- name: Install dependencies
|
59
|
+
run: bundle install
|
60
|
+
- name: Run tests
|
61
|
+
run: >-
|
62
|
+
./.github/scripts/setup_creds.sh &&
|
63
|
+
bundle exec rake test:compute-core_networking
|
64
|
+
|
65
|
+
test-compute-instance_groups:
|
66
|
+
runs-on: self-hosted
|
67
|
+
strategy:
|
68
|
+
matrix:
|
69
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
70
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
71
|
+
max-parallel: 1
|
72
|
+
|
73
|
+
steps:
|
74
|
+
- uses: actions/checkout@v2.4.0
|
75
|
+
- name: Set up Ruby
|
76
|
+
uses: ruby/setup-ruby@v1
|
77
|
+
env:
|
78
|
+
# Needs to be set up for self-hosted runners, see:
|
79
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
80
|
+
# Image used in runners: summerwind/actions-runner
|
81
|
+
ImageOS: ubuntu20
|
82
|
+
with:
|
83
|
+
ruby-version: ${{ matrix.ruby-version }}
|
84
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
85
|
+
- name: Install dependencies
|
86
|
+
run: bundle install
|
87
|
+
- name: Run tests
|
88
|
+
run: >-
|
89
|
+
./.github/scripts/setup_creds.sh &&
|
90
|
+
bundle exec rake test:compute-instance_groups
|
91
|
+
|
92
|
+
test-compute-loadbalancing:
|
93
|
+
runs-on: self-hosted
|
94
|
+
strategy:
|
95
|
+
matrix:
|
96
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
97
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
98
|
+
max-parallel: 1
|
99
|
+
|
100
|
+
steps:
|
101
|
+
- uses: actions/checkout@v2.4.0
|
102
|
+
- name: Set up Ruby
|
103
|
+
uses: ruby/setup-ruby@v1
|
104
|
+
env:
|
105
|
+
# Needs to be set up for self-hosted runners, see:
|
106
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
107
|
+
# Image used in runners: summerwind/actions-runner
|
108
|
+
ImageOS: ubuntu20
|
109
|
+
with:
|
110
|
+
ruby-version: ${{ matrix.ruby-version }}
|
111
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
112
|
+
- name: Install dependencies
|
113
|
+
run: bundle install
|
114
|
+
- name: Run tests
|
115
|
+
run: >-
|
116
|
+
./.github/scripts/setup_creds.sh &&
|
117
|
+
bundle exec rake test:compute-loadbalancing
|
118
|
+
|
119
|
+
test-monitoring:
|
120
|
+
runs-on: self-hosted
|
121
|
+
strategy:
|
122
|
+
matrix:
|
123
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
124
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
125
|
+
max-parallel: 1
|
126
|
+
|
127
|
+
steps:
|
128
|
+
- uses: actions/checkout@v2.4.0
|
129
|
+
- name: Set up Ruby
|
130
|
+
uses: ruby/setup-ruby@v1
|
131
|
+
env:
|
132
|
+
# Needs to be set up for self-hosted runners, see:
|
133
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
134
|
+
# Image used in runners: summerwind/actions-runner
|
135
|
+
ImageOS: ubuntu20
|
136
|
+
with:
|
137
|
+
ruby-version: ${{ matrix.ruby-version }}
|
138
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
139
|
+
- name: Install dependencies
|
140
|
+
run: bundle install
|
141
|
+
- name: Run tests
|
142
|
+
run: >-
|
143
|
+
./.github/scripts/setup_creds.sh &&
|
144
|
+
bundle exec rake test:monitoring
|
145
|
+
|
146
|
+
test-storage:
|
147
|
+
runs-on: self-hosted
|
148
|
+
strategy:
|
149
|
+
matrix:
|
150
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
151
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
152
|
+
max-parallel: 1
|
153
|
+
|
154
|
+
steps:
|
155
|
+
- uses: actions/checkout@v2.4.0
|
156
|
+
- name: Set up Ruby
|
157
|
+
uses: ruby/setup-ruby@v1
|
158
|
+
env:
|
159
|
+
# Needs to be set up for self-hosted runners, see:
|
160
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
161
|
+
# Image used in runners: summerwind/actions-runner
|
162
|
+
ImageOS: ubuntu20
|
163
|
+
with:
|
164
|
+
ruby-version: ${{ matrix.ruby-version }}
|
165
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
166
|
+
- name: Install dependencies
|
167
|
+
run: bundle install
|
168
|
+
- name: Run tests
|
169
|
+
run: >-
|
170
|
+
./.github/scripts/setup_creds.sh &&
|
171
|
+
bundle exec rake test:storage
|
172
|
+
|
173
|
+
test-pubsub:
|
174
|
+
runs-on: self-hosted
|
175
|
+
strategy:
|
176
|
+
matrix:
|
177
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
178
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
179
|
+
max-parallel: 1
|
180
|
+
|
181
|
+
steps:
|
182
|
+
- uses: actions/checkout@v2.4.0
|
183
|
+
- name: Set up Ruby
|
184
|
+
uses: ruby/setup-ruby@v1
|
185
|
+
env:
|
186
|
+
# Needs to be set up for self-hosted runners, see:
|
187
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
188
|
+
# Image used in runners: summerwind/actions-runner
|
189
|
+
ImageOS: ubuntu20
|
190
|
+
with:
|
191
|
+
ruby-version: ${{ matrix.ruby-version }}
|
192
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
193
|
+
- name: Install dependencies
|
194
|
+
run: bundle install
|
195
|
+
- name: Run tests
|
196
|
+
run: >-
|
197
|
+
./.github/scripts/setup_creds.sh &&
|
198
|
+
bundle exec rake test:pubsub
|
199
|
+
|
200
|
+
test-sql:
|
201
|
+
runs-on: self-hosted
|
202
|
+
strategy:
|
203
|
+
matrix:
|
204
|
+
ruby-version: [ '2.7', '3.0', '3.1' ]
|
205
|
+
# Integration tests from the same task cannot run in parallel yet due to cleanup
|
206
|
+
max-parallel: 1
|
207
|
+
|
208
|
+
steps:
|
209
|
+
- uses: actions/checkout@v2.4.0
|
210
|
+
- name: Set up Ruby
|
211
|
+
uses: ruby/setup-ruby@v1
|
212
|
+
env:
|
213
|
+
# Needs to be set up for self-hosted runners, see:
|
214
|
+
# https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
215
|
+
# Image used in runners: summerwind/actions-runner
|
216
|
+
ImageOS: ubuntu20
|
217
|
+
with:
|
218
|
+
ruby-version: ${{ matrix.ruby-version }}
|
219
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
220
|
+
- name: Install dependencies
|
221
|
+
run: bundle install
|
222
|
+
- name: Run tests
|
223
|
+
run: >-
|
224
|
+
./.github/scripts/setup_creds.sh &&
|
225
|
+
bundle exec rake test:sql
|
data/.github/workflows/stale.yml
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
name: unit-tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test-unit:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', 'head', 'truffleruby-head']
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2.4.0
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
23
|
+
- name: Install dependencies
|
24
|
+
run: bundle install
|
25
|
+
- name: Run tests
|
26
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,58 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
|
7
7
|
## Next
|
8
8
|
|
9
|
+
## 1.19.0
|
10
|
+
|
11
|
+
### User-facing
|
12
|
+
|
13
|
+
#### Fixed
|
14
|
+
|
15
|
+
- \#561 Add ruby 3.1 to testing
|
16
|
+
- \#566 remove execute permission from network.rb
|
17
|
+
- \#571 replace Proc.new usage for Ruby 3
|
18
|
+
|
19
|
+
## 1.18.0
|
20
|
+
|
21
|
+
### User-facing
|
22
|
+
|
23
|
+
#### Fixed
|
24
|
+
|
25
|
+
- \#556 Correct conflicting Ruby version info in readme [gdubicki]
|
26
|
+
- \#557 Update current images projects list [gdubicki]
|
27
|
+
- \#558 Fix page iteration when using #files with block [jgigault]
|
28
|
+
- \#562 Loosen fog-core dependency
|
29
|
+
|
30
|
+
## 1.17.0
|
31
|
+
|
32
|
+
### User-facing
|
33
|
+
|
34
|
+
#### Added
|
35
|
+
|
36
|
+
- \#550 Add support for instance display device [dcode]
|
37
|
+
|
38
|
+
## 1.16.1
|
39
|
+
|
40
|
+
### User-facing
|
41
|
+
|
42
|
+
#### Fixed
|
43
|
+
|
44
|
+
- \#545 Avoid duplicate GET requests when retrieving body [stanhu]
|
45
|
+
- \#547 Remove exec bit from non_scripts [kbrock]
|
46
|
+
|
47
|
+
## 1.16.0
|
48
|
+
|
49
|
+
### User-facing
|
50
|
+
|
51
|
+
#### Fixed
|
52
|
+
|
53
|
+
- \#540 Bring back integration tests for Fog-Google and fix an array of small bugs/regressions [temikus]
|
54
|
+
|
55
|
+
### Development changes
|
56
|
+
|
57
|
+
#### Added
|
58
|
+
|
59
|
+
- \#532 Add Truffleruby head to CI [gogainda]
|
60
|
+
|
9
61
|
## 1.15.0
|
10
62
|
|
11
63
|
### User-facing
|
data/README.md
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
# ⚠️ ATTENTION ⚠️ HELP NEEDED WITH CI
|
2
|
-
|
3
|
-
With both me and icco@ departing Google **fog-google no longer has a CI stack** as we don't have access to a sponsored GCP account anymore and I've been unsuccessful in finding someone who would volunteer to maintain this project or CI at the time of my departure.
|
4
|
-
|
5
|
-
There is no easy way to say this but we need help as costs of running a CI stack that touches almost all GCP resources is significant. We know there's a lot of companies out there that are using this lib, as well as tooling based on it so if you want to help us with running a CI stack or provide sponsorship for a GCP account - please contact me at code \<at\> temik.me
|
6
|
-
|
7
|
-
--
|
8
|
-
Artem (temikus@) - Lead maintainer
|
9
|
-
|
10
1
|
# Fog::Google
|
11
2
|
|
12
3
|
[![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://github.com/fog/fog-google/actions/workflows/ruby.yml/badge.svg)](https://github.com/fog/fog-google/actions/workflows/ruby.yml) [![codecov](https://codecov.io/gh/fog/fog-google/branch/master/graph/badge.svg)](https://codecov.io/gh/fog/fog-google) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=fog/fog-google)](https://dependabot.com) [![Doc coverage](https://inch-ci.org/github/fog/fog-google.svg?branch=master)](https://inch-ci.org/github/fog/fog-google)
|
@@ -17,10 +8,20 @@ The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3
|
|
17
8
|
|
18
9
|
- As of **v1.0.0**, fog-google includes google-api-client as a dependency, there is no need to include it separately anymore.
|
19
10
|
|
20
|
-
- Fog-google is currently supported on Ruby 2.
|
11
|
+
- Fog-google is currently supported on Ruby 2.6+ See [supported ruby versions](#supported-ruby-versions) for more info.
|
21
12
|
|
22
13
|
See **[MIGRATING.md](MIGRATING.md)** for migration between major versions.
|
23
14
|
|
15
|
+
# Sponsors
|
16
|
+
|
17
|
+
We're proud to be sponsored by MeisterLabs who are generously funding our CI stack. A small message from them:
|
18
|
+
|
19
|
+
<img align="right" width=100 height=100 src="https://user-images.githubusercontent.com/2083229/125146917-d965a680-e16b-11eb-8ad2-611b39056ca2.png">
|
20
|
+
|
21
|
+
*"As extensive users of fog-google we are excited to help! Meister is the company behind the productivity tools [MindMeister](https://www.mindmeister.com/), [MeisterTask](https://www.meistertask.com), and [MeisterNote](https://www.meisternote.com/). We are based in Vienna, Austria and we have a very talented international team who build our products on top of Ruby on Rails, Elixir, React and Redux. We are constantly looking for great talent in Engineering, so If you feel like taking on a new Ruby or Elixir challenge. get in touch, open jobs can be found [here](https://www.meisterlabs.com/jobs/)."*
|
22
|
+
|
23
|
+
# Usage
|
24
|
+
|
24
25
|
## Storage
|
25
26
|
|
26
27
|
There are two ways to access [Google Cloud Storage](https://cloud.google.com/storage/). The old S3 API and the new JSON API. `Fog::Storage::Google` will automatically direct you to the appropriate API based on the credentials you provide it.
|
@@ -174,7 +175,7 @@ $ bundle exec pry
|
|
174
175
|
|
175
176
|
## Supported Ruby Versions
|
176
177
|
|
177
|
-
Fog-google is currently supported on Ruby 2.
|
178
|
+
Fog-google is currently supported on Ruby 2.6+.
|
178
179
|
|
179
180
|
In general we support (and run our CI) for Ruby versions that are actively supported
|
180
181
|
by Ruby Core - that is, Ruby versions that are not end of life. Older versions of
|
data/fog-google.gemspec
CHANGED
@@ -20,16 +20,24 @@ Gem::Specification.new do |spec|
|
|
20
20
|
# As of 0.1.1
|
21
21
|
spec.required_ruby_version = ">= 2.0"
|
22
22
|
|
23
|
-
|
24
|
-
spec.add_dependency "fog-core", "<= 2.1.0"
|
23
|
+
spec.add_dependency "fog-core", "< 2.3"
|
25
24
|
spec.add_dependency "fog-json", "~> 1.2"
|
26
25
|
spec.add_dependency "fog-xml", "~> 0.1.0"
|
27
26
|
|
28
|
-
spec.add_dependency "google-
|
27
|
+
spec.add_dependency "google-apis-storage_v1", "~> 0.6"
|
28
|
+
spec.add_dependency "google-apis-iamcredentials_v1", "~> 0.6"
|
29
|
+
spec.add_dependency "google-apis-compute_v1", "~> 0.14"
|
30
|
+
spec.add_dependency "google-apis-monitoring_v3", "~> 0.12"
|
31
|
+
spec.add_dependency "google-apis-dns_v1", "~> 0.12"
|
32
|
+
spec.add_dependency "google-apis-pubsub_v1", "~> 0.7"
|
33
|
+
spec.add_dependency "google-apis-sqladmin_v1beta4", "~> 0.13"
|
34
|
+
|
29
35
|
spec.add_dependency "google-cloud-env", "~> 1.2"
|
30
36
|
|
31
37
|
# Debugger
|
32
|
-
|
38
|
+
# Locked because pry-byebug is broken with 13+
|
39
|
+
# see: https://github.com/deivid-rodriguez/pry-byebug/issues/343
|
40
|
+
spec.add_development_dependency "pry", "= 0.13.0"
|
33
41
|
|
34
42
|
# Testing gems
|
35
43
|
spec.add_development_dependency "retriable"
|
File without changes
|
File without changes
|
@@ -11,16 +11,17 @@ module Fog
|
|
11
11
|
GLOBAL_PROJECTS = %w(
|
12
12
|
centos-cloud
|
13
13
|
cos-cloud
|
14
|
-
coreos-cloud
|
15
14
|
debian-cloud
|
15
|
+
fedora-coreos-cloud
|
16
16
|
rhel-cloud
|
17
17
|
rhel-sap-cloud
|
18
|
+
rocky-linux-cloud
|
18
19
|
suse-cloud
|
19
20
|
suse-sap-cloud
|
20
21
|
ubuntu-os-cloud
|
22
|
+
ubuntu-os-pro-cloud
|
21
23
|
windows-cloud
|
22
24
|
windows-sql-cloud
|
23
|
-
opensuse-cloud
|
24
25
|
).freeze
|
25
26
|
|
26
27
|
def all
|
File without changes
|
File without changes
|
@@ -50,6 +50,13 @@ module Fog
|
|
50
50
|
# @return [Array<Hash>]
|
51
51
|
attribute :disks
|
52
52
|
|
53
|
+
# @example Enable the display device
|
54
|
+
# {
|
55
|
+
# :enable_display => true
|
56
|
+
# }
|
57
|
+
# @return [Hash<String,Boolean>]
|
58
|
+
attribute :display_device, :aliases => "displayDevice"
|
59
|
+
|
53
60
|
# @example Guest accelerators
|
54
61
|
# [
|
55
62
|
# {
|
@@ -84,7 +84,10 @@ module Fog
|
|
84
84
|
server.wait_for { ready? }
|
85
85
|
|
86
86
|
# Set the disk to be autodeleted
|
87
|
-
|
87
|
+
# true - autodelete setting
|
88
|
+
# nil - device name (not needed if there's only one disk)
|
89
|
+
# false - set async to false so set the property synchronously
|
90
|
+
server.set_disk_auto_delete(true, nil, false)
|
88
91
|
|
89
92
|
server
|
90
93
|
end
|
File without changes
|
File without changes
|
@@ -10,18 +10,8 @@ module Fog
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class Real
|
13
|
-
INSERTABLE_NETWORK_FIELDS = %i{
|
14
|
-
auto_create_subnetworks
|
15
|
-
description
|
16
|
-
gateway_i_pv4
|
17
|
-
i_pv4_range
|
18
|
-
name
|
19
|
-
routing_config
|
20
|
-
}.freeze
|
21
|
-
|
22
13
|
def insert_network(network_name, opts = {})
|
23
|
-
opts = opts.
|
24
|
-
.merge(:name => network_name)
|
14
|
+
opts = opts.merge(:name => network_name)
|
25
15
|
|
26
16
|
@compute.insert_network(
|
27
17
|
@project,
|
@@ -104,6 +104,10 @@ module Fog
|
|
104
104
|
data[:shielded_instance_config] = ::Google::Apis::ComputeV1::ShieldedInstanceConfig.new(**options[:shielded_instance_config])
|
105
105
|
end
|
106
106
|
|
107
|
+
if data[:display_device]
|
108
|
+
data[:display_device] = ::Google::Apis::ComputeV1::DisplayDevice.new(**options[:display_device])
|
109
|
+
end
|
110
|
+
|
107
111
|
if data[:tags]
|
108
112
|
if options[:tags].is_a?(Array)
|
109
113
|
# Process classic tag notation, i.e. ["fog"]
|
data/lib/fog/google/version.rb
CHANGED
@@ -45,7 +45,16 @@ module Fog
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def body
|
48
|
-
|
48
|
+
return attributes[:body] if attributes.key?(:body)
|
49
|
+
|
50
|
+
file = collection.get(identity)
|
51
|
+
|
52
|
+
attributes[:body] =
|
53
|
+
if file
|
54
|
+
file.attributes[:body]
|
55
|
+
else
|
56
|
+
""
|
57
|
+
end
|
49
58
|
end
|
50
59
|
|
51
60
|
def body=(new_body)
|
@@ -13,11 +13,13 @@ module Fog
|
|
13
13
|
attribute :page_token, :aliases => %w(pageToken page_token)
|
14
14
|
attribute :max_results, :aliases => ["MaxKeys", "max-keys"]
|
15
15
|
attribute :prefix, :aliases => "Prefix"
|
16
|
+
attribute :next_page_token
|
16
17
|
|
17
18
|
def all(options = {})
|
18
19
|
requires :directory
|
19
|
-
|
20
|
-
|
20
|
+
parent = service.list_objects(directory.key, attributes.merge(options))
|
21
|
+
attributes[:next_page_token] = parent.next_page_token
|
22
|
+
data = parent.to_h[:items] || []
|
21
23
|
load(data)
|
22
24
|
end
|
23
25
|
|
@@ -27,6 +29,10 @@ module Fog
|
|
27
29
|
subset = dup.all
|
28
30
|
|
29
31
|
subset.each_file_this_page { |f| yield f }
|
32
|
+
while subset.next_page_token
|
33
|
+
subset = subset.all(:page_token => subset.next_page_token)
|
34
|
+
subset.each_file_this_page { |f| yield f }
|
35
|
+
end
|
30
36
|
end
|
31
37
|
self
|
32
38
|
end
|
@@ -42,12 +48,12 @@ module Fog
|
|
42
48
|
|
43
49
|
def get_https_url(key, expires, options = {})
|
44
50
|
requires :directory
|
45
|
-
service.get_object_https_url(directory.key, key, expires, options)
|
51
|
+
service.get_object_https_url(directory.key, key, expires, **options)
|
46
52
|
end
|
47
53
|
|
48
54
|
def metadata(key, options = {})
|
49
55
|
requires :directory
|
50
|
-
data = service.get_object_metadata(directory.key, key, options).to_h
|
56
|
+
data = service.get_object_metadata(directory.key, key, **options).to_h
|
51
57
|
new(data)
|
52
58
|
rescue ::Google::Apis::ClientError
|
53
59
|
nil
|
@@ -156,12 +156,12 @@ DATA
|
|
156
156
|
# See https://cloud.google.com/storage/docs/access-control/signed-urls-v2
|
157
157
|
# @return [String] Signature binary blob
|
158
158
|
def iam_signer(string_to_sign)
|
159
|
-
request =
|
160
|
-
|
161
|
-
|
159
|
+
request = ::Google::Apis::IamcredentialsV1::SignBlobRequest.new(
|
160
|
+
payload: string_to_sign
|
161
|
+
)
|
162
162
|
|
163
163
|
resource = "projects/-/serviceAccounts/#{google_access_id}"
|
164
|
-
response = @iam_service.sign_service_account_blob
|
164
|
+
response = @iam_service.sign_service_account_blob(resource, request)
|
165
165
|
|
166
166
|
return response.signed_blob
|
167
167
|
end
|
@@ -6,14 +6,14 @@ module Fog
|
|
6
6
|
# Deprecated, redirects to get_object_https_url.rb
|
7
7
|
def get_object_url(bucket_name, object_name, expires, options = {})
|
8
8
|
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
|
9
|
-
get_object_https_url(bucket_name, object_name, expires, options)
|
9
|
+
get_object_https_url(bucket_name, object_name, expires, **options)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
class Mock # :nodoc:all
|
14
14
|
def get_object_url(bucket_name, object_name, expires, options = {})
|
15
15
|
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
|
16
|
-
get_object_https_url(bucket_name, object_name, expires, options)
|
16
|
+
get_object_https_url(bucket_name, object_name, expires, **options)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -24,7 +24,7 @@ module Fog
|
|
24
24
|
# * 'ETag'<~String> - Etag of object
|
25
25
|
# * 'Last-Modified'<~String> - Last modified timestamp for object
|
26
26
|
#
|
27
|
-
def get_object(bucket_name, object_name, options = {}, &
|
27
|
+
def get_object(bucket_name, object_name, options = {}, &block)
|
28
28
|
raise ArgumentError.new("bucket_name is required") unless bucket_name
|
29
29
|
raise ArgumentError.new("object_name is required") unless object_name
|
30
30
|
|
@@ -40,7 +40,7 @@ module Fog
|
|
40
40
|
params[:headers]["If-Unmodified-Since"] = Fog::Time.at(options["If-Unmodified-Since"].to_i).to_date_header
|
41
41
|
end
|
42
42
|
|
43
|
-
params[:response_block] =
|
43
|
+
params[:response_block] = block if block_given?
|
44
44
|
|
45
45
|
request(params.merge!(:expects => [200, 206],
|
46
46
|
:host => "#{bucket_name}.#{@host}",
|