fog-google 1.12.1 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/scripts/setup_creds.sh +10 -0
- data/.github/workflows/integration.yml +225 -0
- data/.github/workflows/stale.yml +23 -0
- data/.github/workflows/unit.yml +26 -0
- data/CHANGELOG.md +65 -1
- data/README.md +11 -1
- data/fog-google.gemspec +12 -3
- data/lib/fog/compute/google/models/address.rb +1 -1
- data/lib/fog/compute/google/models/addresses.rb +6 -6
- data/lib/fog/compute/google/models/backend_service.rb +1 -1
- data/lib/fog/compute/google/models/disk.rb +3 -3
- data/lib/fog/compute/google/models/disk_types.rb +2 -2
- data/lib/fog/compute/google/models/disks.rb +2 -2
- data/lib/fog/compute/google/models/firewall.rb +2 -2
- data/lib/fog/compute/google/models/firewalls.rb +1 -1
- data/lib/fog/compute/google/models/forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/models/global_addresses.rb +1 -1
- data/lib/fog/compute/google/models/global_forwarding_rules.rb +1 -1
- data/lib/fog/compute/google/models/http_health_check.rb +2 -2
- data/lib/fog/compute/google/models/instance_group_managers.rb +2 -2
- data/lib/fog/compute/google/models/machine_types.rb +2 -2
- data/lib/fog/compute/google/models/network.rb +1 -1
- data/lib/fog/compute/google/models/operations.rb +3 -3
- 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/servers.rb +7 -4
- data/lib/fog/compute/google/models/subnetwork.rb +0 -0
- data/lib/fog/compute/google/models/subnetworks.rb +2 -2
- data/lib/fog/compute/google/models/target_instances.rb +2 -2
- data/lib/fog/compute/google/models/target_pools.rb +2 -2
- data/lib/fog/compute/google/models/url_maps.rb +1 -1
- data/lib/fog/compute/google/requests/abandon_instances.rb +1 -1
- data/lib/fog/compute/google/requests/add_instance_group_instances.rb +3 -3
- data/lib/fog/compute/google/requests/add_server_access_config.rb +3 -3
- data/lib/fog/compute/google/requests/add_target_pool_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/add_target_pool_instances.rb +2 -2
- data/lib/fog/compute/google/requests/attach_disk.rb +1 -1
- data/lib/fog/compute/google/requests/create_disk_snapshot.rb +1 -1
- data/lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb +1 -1
- data/lib/fog/compute/google/requests/get_backend_service_health.rb +1 -1
- data/lib/fog/compute/google/requests/get_region.rb +0 -0
- data/lib/fog/compute/google/requests/get_server_serial_port_output.rb +2 -2
- data/lib/fog/compute/google/requests/get_target_pool_health.rb +1 -1
- data/lib/fog/compute/google/requests/insert_address.rb +2 -2
- data/lib/fog/compute/google/requests/insert_backend_service.rb +1 -1
- data/lib/fog/compute/google/requests/insert_disk.rb +1 -1
- data/lib/fog/compute/google/requests/insert_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/insert_forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/requests/insert_global_address.rb +1 -1
- data/lib/fog/compute/google/requests/insert_global_forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/requests/insert_http_health_check.rb +1 -1
- data/lib/fog/compute/google/requests/insert_image.rb +1 -1
- data/lib/fog/compute/google/requests/insert_instance_group.rb +3 -3
- data/lib/fog/compute/google/requests/insert_instance_group_manager.rb +7 -7
- data/lib/fog/compute/google/requests/insert_instance_template.rb +3 -3
- data/lib/fog/compute/google/requests/insert_network.rb +2 -12
- data/lib/fog/compute/google/requests/insert_route.rb +10 -10
- data/lib/fog/compute/google/requests/insert_server.rb +9 -9
- data/lib/fog/compute/google/requests/insert_ssl_certificate.rb +4 -4
- data/lib/fog/compute/google/requests/insert_subnetwork.rb +1 -1
- data/lib/fog/compute/google/requests/insert_target_http_proxy.rb +3 -3
- data/lib/fog/compute/google/requests/insert_target_https_proxy.rb +4 -4
- data/lib/fog/compute/google/requests/insert_target_instance.rb +1 -1
- data/lib/fog/compute/google/requests/insert_target_pool.rb +1 -1
- data/lib/fog/compute/google/requests/insert_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/invalidate_url_map_cache.rb +1 -1
- data/lib/fog/compute/google/requests/list_addresses.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_addresses.rb +1 -1
- data/lib/fog/compute/google/requests/list_aggregated_disk_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_disks.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_instance_group_managers.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_instance_groups.rb +1 -1
- data/lib/fog/compute/google/requests/list_aggregated_machine_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_servers.rb +2 -2
- data/lib/fog/compute/google/requests/list_aggregated_subnetworks.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_target_instances.rb +4 -4
- data/lib/fog/compute/google/requests/list_aggregated_target_pools.rb +4 -4
- data/lib/fog/compute/google/requests/list_disk_types.rb +2 -2
- data/lib/fog/compute/google/requests/list_disks.rb +2 -2
- data/lib/fog/compute/google/requests/list_firewalls.rb +4 -4
- data/lib/fog/compute/google/requests/list_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_global_addresses.rb +5 -5
- data/lib/fog/compute/google/requests/list_global_forwarding_rules.rb +2 -2
- data/lib/fog/compute/google/requests/list_global_operations.rb +4 -4
- data/lib/fog/compute/google/requests/list_http_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/list_images.rb +2 -2
- data/lib/fog/compute/google/requests/list_instance_group_managers.rb +2 -2
- data/lib/fog/compute/google/requests/list_instance_templates.rb +4 -4
- data/lib/fog/compute/google/requests/list_machine_types.rb +4 -4
- data/lib/fog/compute/google/requests/list_networks.rb +4 -4
- data/lib/fog/compute/google/requests/list_subnetworks.rb +4 -4
- data/lib/fog/compute/google/requests/list_target_pools.rb +4 -4
- data/lib/fog/compute/google/requests/list_url_maps.rb +2 -2
- data/lib/fog/compute/google/requests/patch_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/remove_instance_group_instances.rb +3 -3
- data/lib/fog/compute/google/requests/remove_target_pool_health_checks.rb +2 -2
- data/lib/fog/compute/google/requests/remove_target_pool_instance.rb +2 -2
- data/lib/fog/compute/google/requests/remove_target_pool_instances.rb +2 -2
- data/lib/fog/compute/google/requests/set_common_instance_metadata.rb +2 -2
- data/lib/fog/compute/google/requests/set_forwarding_rule_target.rb +1 -1
- data/lib/fog/compute/google/requests/set_global_forwarding_rule_target.rb +1 -1
- data/lib/fog/compute/google/requests/set_server_metadata.rb +2 -2
- data/lib/fog/compute/google/requests/set_server_tags.rb +2 -2
- data/lib/fog/compute/google/requests/set_snapshot_labels.rb +2 -2
- data/lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_http_proxy_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_https_proxy_ssl_certificates.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_https_proxy_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/set_target_pool_backup.rb +2 -2
- data/lib/fog/compute/google/requests/update_firewall.rb +1 -1
- data/lib/fog/compute/google/requests/update_http_health_check.rb +1 -1
- data/lib/fog/compute/google/requests/update_url_map.rb +1 -1
- data/lib/fog/compute/google/requests/validate_url_map.rb +1 -1
- data/lib/fog/dns/google/requests/create_change.rb +2 -2
- data/lib/fog/google/models/sql/instance.rb +2 -2
- data/lib/fog/google/requests/monitoring/create_metric_descriptor.rb +8 -8
- data/lib/fog/google/requests/monitoring/create_timeseries.rb +1 -1
- data/lib/fog/google/requests/monitoring/list_timeseries.rb +1 -1
- data/lib/fog/google/requests/pubsub/acknowledge_subscription.rb +1 -1
- data/lib/fog/google/requests/pubsub/create_subscription.rb +3 -3
- data/lib/fog/google/requests/sql/clone_instance.rb +4 -4
- data/lib/fog/google/requests/sql/export_instance.rb +3 -3
- data/lib/fog/google/requests/sql/import_instance.rb +2 -2
- data/lib/fog/google/requests/sql/insert_backup_run.rb +1 -1
- data/lib/fog/google/requests/sql/insert_instance.rb +2 -2
- data/lib/fog/google/requests/sql/insert_ssl_cert.rb +1 -1
- data/lib/fog/google/requests/sql/insert_user.rb +1 -1
- data/lib/fog/google/requests/sql/restore_instance_backup.rb +4 -4
- data/lib/fog/google/requests/sql/update_instance.rb +2 -2
- data/lib/fog/google/shared.rb +3 -3
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/models/directories.rb +1 -1
- data/lib/fog/storage/google_json/models/directory.rb +1 -1
- data/lib/fog/storage/google_json/models/file.rb +11 -2
- data/lib/fog/storage/google_json/models/files.rb +3 -3
- data/lib/fog/storage/google_json/real.rb +4 -4
- data/lib/fog/storage/google_json/requests/copy_object.rb +11 -1
- data/lib/fog/storage/google_json/requests/get_object.rb +6 -3
- data/lib/fog/storage/google_json/requests/get_object_url.rb +2 -2
- data/lib/fog/storage/google_json/requests/list_buckets.rb +4 -4
- data/lib/fog/storage/google_json/requests/list_objects.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket_acl.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object_acl.rb +1 -1
- data/lib/fog/storage/google_json/utils.rb +5 -1
- data/lib/fog/storage/google_xml/models/file.rb +1 -1
- 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
- data/test/integration/monitoring/test_metric_descriptors.rb +1 -1
- data/test/integration/storage/storage_shared.rb +7 -2
- data/test/integration/storage/test_objects.rb +23 -1
- data/test/unit/storage/test_json_requests.rb +8 -0
- metadata +103 -31
- data/.travis.yml +0 -33
- 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: 3c2a96b4bd15024461fec8eef7f06eec40e0f3ea0ac38c4fe076a321f90af2d9
|
4
|
+
data.tar.gz: f05c9185882395140713d9ad79c10d6807c3e987ffac1e7b8b9852cf690671ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aab3e033028612e70daa467b0bd8f3701f3e4ffc5ced7c8a773d2d8766b3d100d0ec8f9d36d11d6b346241e4958c42d36c0a43bdcb32c6058aae296399439a3
|
7
|
+
data.tar.gz: 03b82d1bdeee36bbce9fcf9c73a001bd7364d8885e975ad323d71cab3d1cf0fbdace93cee9509edcdb2fc5e058bd604e6d7d8befaaea356943337f5d159e63de
|
@@ -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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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' ]
|
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.3.4
|
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
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Mark stale issues and pull requests
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: "30 1 * * *"
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
stale:
|
9
|
+
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/stale@v4
|
14
|
+
with:
|
15
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
16
|
+
days-before-stale: 60
|
17
|
+
days-before-close: 7
|
18
|
+
exempt-issue-labels: 'pinned,security'
|
19
|
+
exempt-pr-labels: 'pinned,security'
|
20
|
+
stale-issue-message: 'This issue has been marked inactive and will be closed if no further activity occurs.'
|
21
|
+
stale-pr-message: 'This pr has been marked inactive and will be closed if no further activity occurs.'
|
22
|
+
stale-issue-label: 'no-issue-activity'
|
23
|
+
stale-pr-label: 'no-pr-activity'
|
@@ -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', 'head', 'truffleruby-head']
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2.3.4
|
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,70 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
|
7
7
|
## Next
|
8
8
|
|
9
|
+
## 1.16.0
|
10
|
+
|
11
|
+
### User-facing
|
12
|
+
|
13
|
+
#### Fixed
|
14
|
+
|
15
|
+
- \#540 Bring back integration tests for Fog-Google and fix an array of small bugs/regressions [temikus]
|
16
|
+
|
17
|
+
### Development changes
|
18
|
+
|
19
|
+
#### Added
|
20
|
+
|
21
|
+
- \#532 Add Truffleruby head to CI [gogainda]
|
22
|
+
|
23
|
+
## 1.15.0
|
24
|
+
|
25
|
+
### User-facing
|
26
|
+
|
27
|
+
#### Fixed
|
28
|
+
|
29
|
+
- \#534 Fix get_object not working with binary files [stanhu]
|
30
|
+
|
31
|
+
## 1.14.0
|
32
|
+
|
33
|
+
### User-facing
|
34
|
+
|
35
|
+
#### Added
|
36
|
+
|
37
|
+
- \#520 Support passing object properties to #copy_object [mshibuya]
|
38
|
+
|
39
|
+
#### Fixed
|
40
|
+
|
41
|
+
- \#530 Unescape slashes in urls [krokodaxl]
|
42
|
+
|
43
|
+
- \#528 Fix Ruby 3.0 kwargs error in `#copy_object` [deeeki]
|
44
|
+
|
45
|
+
- \#521 Unlink file temp file immediately [stanhu]
|
46
|
+
|
47
|
+
- \#527 \#523 Fix Ruby 3.0 kwargs failures [stanhu]
|
48
|
+
|
49
|
+
### Development changes
|
50
|
+
|
51
|
+
#### Fixed
|
52
|
+
|
53
|
+
- \#525 - Bump actions/checkout from 2 to 2.3.4
|
54
|
+
|
55
|
+
- \#524 - Bump actions/stale from 3 to 3.0.18
|
56
|
+
|
57
|
+
|
58
|
+
## 1.13.0
|
59
|
+
|
60
|
+
### User-facing
|
61
|
+
|
62
|
+
### Fixed
|
63
|
+
|
64
|
+
fix deprecated URI.escape usage to support Ruby 3.0
|
65
|
+
fix apply_client_options def to support Ruby 3.0
|
66
|
+
|
67
|
+
### Development Changes
|
68
|
+
|
69
|
+
Add github actions config and dependabot
|
70
|
+
Drop travis usage
|
71
|
+
|
72
|
+
### Added
|
9
73
|
|
10
74
|
## 1.12.1
|
11
75
|
|
@@ -447,4 +511,4 @@ We encourage people using 0.5.1 to upgrade.
|
|
447
511
|
|
448
512
|
#### Added
|
449
513
|
|
450
|
-
#### Fixed
|
514
|
+
#### Fixed
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fog::Google
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://
|
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)
|
4
4
|
|
5
5
|
The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3000. Please send pull requests to them.
|
6
6
|
|
@@ -12,6 +12,16 @@ The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3
|
|
12
12
|
|
13
13
|
See **[MIGRATING.md](MIGRATING.md)** for migration between major versions.
|
14
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
|
+
|
15
25
|
## Storage
|
16
26
|
|
17
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.
|
data/fog-google.gemspec
CHANGED
@@ -18,18 +18,27 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
# As of 0.1.1
|
21
|
-
spec.required_ruby_version = "
|
21
|
+
spec.required_ruby_version = ">= 2.0"
|
22
22
|
|
23
23
|
# Locked until https://github.com/fog/fog-google/issues/417 is resolved
|
24
24
|
spec.add_dependency "fog-core", "<= 2.1.0"
|
25
25
|
spec.add_dependency "fog-json", "~> 1.2"
|
26
26
|
spec.add_dependency "fog-xml", "~> 0.1.0"
|
27
27
|
|
28
|
-
spec.add_dependency "google-
|
28
|
+
spec.add_dependency "google-apis-storage_v1", "~> 0.6"
|
29
|
+
spec.add_dependency "google-apis-iamcredentials_v1", "~> 0.6"
|
30
|
+
spec.add_dependency "google-apis-compute_v1", "~> 0.14"
|
31
|
+
spec.add_dependency "google-apis-monitoring_v3", "~> 0.12"
|
32
|
+
spec.add_dependency "google-apis-dns_v1", "~> 0.12"
|
33
|
+
spec.add_dependency "google-apis-pubsub_v1", "~> 0.7"
|
34
|
+
spec.add_dependency "google-apis-sqladmin_v1beta4", "~> 0.13"
|
35
|
+
|
29
36
|
spec.add_dependency "google-cloud-env", "~> 1.2"
|
30
37
|
|
31
38
|
# Debugger
|
32
|
-
|
39
|
+
# Locked because pry-byebug is broken with 13+
|
40
|
+
# see: https://github.com/deivid-rodriguez/pry-byebug/issues/343
|
41
|
+
spec.add_development_dependency "pry", "= 0.13.0"
|
33
42
|
|
34
43
|
# Testing gems
|
35
44
|
spec.add_development_dependency "retriable"
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
}
|
14
14
|
|
15
15
|
if region
|
16
|
-
data = service.list_addresses(region, opts).items || []
|
16
|
+
data = service.list_addresses(region, **opts).items || []
|
17
17
|
else
|
18
18
|
data = []
|
19
|
-
service.list_aggregated_addresses(opts).items.each_value do |scoped_list|
|
19
|
+
service.list_aggregated_addresses(**opts).items.each_value do |scoped_list|
|
20
20
|
data.concat(scoped_list.addresses) if scoped_list && scoped_list.addresses
|
21
21
|
end
|
22
22
|
end
|
@@ -28,8 +28,8 @@ module Fog
|
|
28
28
|
address = service.get_address(identity, region).to_h
|
29
29
|
return new(address)
|
30
30
|
elsif identity
|
31
|
-
response = all(:
|
32
|
-
:
|
31
|
+
response = all(filter: "name eq #{identity}",
|
32
|
+
max_results: 1)
|
33
33
|
address = response.first unless response.empty?
|
34
34
|
return address
|
35
35
|
end
|
@@ -39,7 +39,7 @@ module Fog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def get_by_ip_address(ip_address)
|
42
|
-
addresses = service.list_aggregated_addresses(:
|
42
|
+
addresses = service.list_aggregated_addresses(filter: "address eq .*#{ip_address}").items
|
43
43
|
address = addresses.each_value.select(&:addresses)
|
44
44
|
|
45
45
|
return nil if address.empty?
|
@@ -47,7 +47,7 @@ module Fog
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def get_by_name(ip_name)
|
50
|
-
names = service.list_aggregated_addresses(:
|
50
|
+
names = service.list_aggregated_addresses(filter: "name eq .*#{ip_name}").items
|
51
51
|
name = names.each_value.select(&:addresses)
|
52
52
|
|
53
53
|
return nil if name.empty?
|
@@ -29,7 +29,7 @@ module Fog
|
|
29
29
|
:timeout_sec => timeout_sec
|
30
30
|
}
|
31
31
|
|
32
|
-
data = service.insert_backend_service(name, options)
|
32
|
+
data = service.insert_backend_service(name, **options)
|
33
33
|
operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name)
|
34
34
|
operation.wait_for { ready? }
|
35
35
|
reload
|
@@ -51,8 +51,8 @@ module Fog
|
|
51
51
|
|
52
52
|
# Request needs backward compatibility so source image is specified in
|
53
53
|
# method arguments
|
54
|
-
data = service.insert_disk(name, zone, options[:source_image], options)
|
55
|
-
operation = Fog::Compute::Google::Operations.new(:
|
54
|
+
data = service.insert_disk(name, zone, options[:source_image], **options)
|
55
|
+
operation = Fog::Compute::Google::Operations.new(service: service)
|
56
56
|
.get(data.name, data.zone)
|
57
57
|
operation.wait_for { ready? }
|
58
58
|
reload
|
@@ -103,7 +103,7 @@ module Fog
|
|
103
103
|
# @return [Hash] Attached disk configuration hash
|
104
104
|
def attached_disk_obj(opts = {})
|
105
105
|
requires :self_link
|
106
|
-
collection.attached_disk_obj(self_link, opts)
|
106
|
+
collection.attached_disk_obj(self_link, **opts)
|
107
107
|
end
|
108
108
|
|
109
109
|
# A legacy shorthand for attached_disk_obj
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
:page_token => page_token
|
14
14
|
}
|
15
15
|
if zone
|
16
|
-
data = service.list_disk_types(zone, opts).items
|
16
|
+
data = service.list_disk_types(zone, **opts).items
|
17
17
|
else
|
18
18
|
data = []
|
19
|
-
service.list_aggregated_disk_types(opts).items.each_value do |scoped_lst|
|
19
|
+
service.list_aggregated_disk_types(**opts).items.each_value do |scoped_lst|
|
20
20
|
data.concat(scoped_lst.disk_types) if scoped_lst && scoped_lst.disk_types
|
21
21
|
end
|
22
22
|
end
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
:page_token => page_token
|
14
14
|
}
|
15
15
|
if zone
|
16
|
-
data = service.list_disks(zone, opts).items || []
|
16
|
+
data = service.list_disks(zone, **opts).items || []
|
17
17
|
else
|
18
18
|
data = []
|
19
|
-
service.list_aggregated_disks(opts).items.each_value do |scoped_list|
|
19
|
+
service.list_aggregated_disks(**opts).items.each_value do |scoped_list|
|
20
20
|
data.concat(scoped_list.disks) if scoped_list.disks
|
21
21
|
end
|
22
22
|
end
|
@@ -53,7 +53,7 @@ module Fog
|
|
53
53
|
|
54
54
|
def create
|
55
55
|
data = service.insert_firewall(identity, attributes)
|
56
|
-
operation = Fog::Compute::Google::Operations.new(:
|
56
|
+
operation = Fog::Compute::Google::Operations.new(service: service)
|
57
57
|
.get(data.name)
|
58
58
|
operation.wait_for { ready? }
|
59
59
|
reload
|
@@ -63,7 +63,7 @@ module Fog
|
|
63
63
|
requires :identity, :allowed, :network
|
64
64
|
|
65
65
|
data = service.update_firewall(identity, attributes)
|
66
|
-
operation = Fog::Compute::Google::Operations.new(:
|
66
|
+
operation = Fog::Compute::Google::Operations.new(service: service)
|
67
67
|
.get(data.name)
|
68
68
|
operation.wait_for { ready? }
|
69
69
|
reload
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
}
|
14
14
|
|
15
15
|
if region
|
16
|
-
data = service.list_forwarding_rules(region, opts).items || []
|
16
|
+
data = service.list_forwarding_rules(region, **opts).items || []
|
17
17
|
else
|
18
18
|
data = []
|
19
|
-
service.list_aggregated_forwarding_rules(opts).items
|
19
|
+
service.list_aggregated_forwarding_rules(**opts).items
|
20
20
|
.each_value do |scoped_list|
|
21
21
|
if scoped_list && scoped_list.forwarding_rules
|
22
22
|
data.concat(scoped_list.forwarding_rules)
|
@@ -51,7 +51,7 @@ module Fog
|
|
51
51
|
requires :name
|
52
52
|
|
53
53
|
data = service.insert_http_health_check(name, opts)
|
54
|
-
operation = Fog::Compute::Google::Operations.new(:
|
54
|
+
operation = Fog::Compute::Google::Operations.new(service: service)
|
55
55
|
.get(data.name, data.zone)
|
56
56
|
operation.wait_for { ready? }
|
57
57
|
reload
|
@@ -60,7 +60,7 @@ module Fog
|
|
60
60
|
def update(opts)
|
61
61
|
requires :name
|
62
62
|
data = service.update_http_health_check(name, opts)
|
63
|
-
operation = Fog::Compute::Google::Operations.new(:
|
63
|
+
operation = Fog::Compute::Google::Operations.new(service: service)
|
64
64
|
.get(data.name, data.zone)
|
65
65
|
operation.wait_for { ready? }
|
66
66
|
reload
|
@@ -14,10 +14,10 @@ module Fog
|
|
14
14
|
}
|
15
15
|
|
16
16
|
if zone
|
17
|
-
data = service.list_instance_group_managers(zone, opts).items || []
|
17
|
+
data = service.list_instance_group_managers(zone, **opts).items || []
|
18
18
|
else
|
19
19
|
data = []
|
20
|
-
service.list_aggregated_instance_group_managers(opts).items.each_value do |group|
|
20
|
+
service.list_aggregated_instance_group_managers(**opts).items.each_value do |group|
|
21
21
|
data.concat(group.instance_group_managers) if group.instance_group_managers
|
22
22
|
end
|
23
23
|
end
|
@@ -13,10 +13,10 @@ module Fog
|
|
13
13
|
}
|
14
14
|
|
15
15
|
if zone
|
16
|
-
data = service.list_machine_types(zone, opts).items
|
16
|
+
data = service.list_machine_types(zone, **opts).items
|
17
17
|
else
|
18
18
|
data = []
|
19
|
-
service.list_aggregated_machine_types(opts).items.each_value do |scoped_list|
|
19
|
+
service.list_aggregated_machine_types(**opts).items.each_value do |scoped_list|
|
20
20
|
data.concat(scoped_list.machine_types) if scoped_list && scoped_list.machine_types
|
21
21
|
end
|
22
22
|
end
|