fog-google 1.11.0 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ruby.yml +34 -0
- data/.github/workflows/stale.yml +23 -0
- data/CHANGELOG.md +88 -1
- data/README.md +19 -10
- data/ci/docker-image/Dockerfile +3 -3
- data/fog-google.gemspec +2 -2
- 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/operations.rb +3 -3
- data/lib/fog/compute/google/models/servers.rb +3 -3
- 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_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 +1 -1
- data/lib/fog/compute/google/requests/insert_route.rb +10 -10
- data/lib/fog/compute/google/requests/insert_server.rb +12 -8
- 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/delete_user.rb +1 -1
- 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 +1 -1
- data/lib/fog/storage/google_json/models/files.rb +1 -1
- data/lib/fog/storage/google_json/requests/copy_object.rb +12 -1
- data/lib/fog/storage/google_json/requests/get_object.rb +6 -3
- 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 +2 -2
- data/tasks/changelog.rake +5 -3
- 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 +39 -1
- data/test/unit/storage/test_common_xml_collections.rb +11 -0
- data/test/unit/storage/test_json_requests.rb +8 -0
- metadata +14 -13
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a6eea488c39dbca402a8a3a648ab1ebfbca31762c7b3f9d6828c3e2866b9e500
|
4
|
+
data.tar.gz: ce03073c85ae8b82eb60c60f38e4ae400defd42964bf4eeb74e12dfc3f550732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d53bdc28be406f9144ef15790f71dbece9444c44d06786ccf6a6aa35c7214bf5e5af28e26a45dbe7feef184c242c07cb90cc20dfadf869b79af6f9c330893a1
|
7
|
+
data.tar.gz: 65a11e596a256e5d784ff63e0080615a5cfefc6d35628b77f131166ff00bc949858c96bed221ebef1860debe996bd7adf55cf0ffe2c3d4f065cd6f64d7bbf61c
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0', 'head']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2.3.4
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@v1
|
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: bundle exec rake
|
@@ -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@v3.0.18
|
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'
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,93 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
|
7
7
|
## Next
|
8
8
|
|
9
|
+
## 1.15.0
|
10
|
+
|
11
|
+
### User-facing
|
12
|
+
|
13
|
+
#### Fixed
|
14
|
+
|
15
|
+
- \#534 Fix get_object not working with binary files [stanhu]
|
16
|
+
|
17
|
+
## 1.14.0
|
18
|
+
|
19
|
+
### User-facing
|
20
|
+
|
21
|
+
#### Added
|
22
|
+
|
23
|
+
- \#520 Support passing object properties to #copy_object [mshibuya]
|
24
|
+
|
25
|
+
#### Fixed
|
26
|
+
|
27
|
+
- \#530 Unescape slashes in urls [krokodaxl]
|
28
|
+
|
29
|
+
- \#528 Fix Ruby 3.0 kwargs error in `#copy_object` [deeeki]
|
30
|
+
|
31
|
+
- \#521 Unlink file temp file immediately [stanhu]
|
32
|
+
|
33
|
+
- \#527 \#523 Fix Ruby 3.0 kwargs failures [stanhu]
|
34
|
+
|
35
|
+
### Development changes
|
36
|
+
|
37
|
+
#### Fixed
|
38
|
+
|
39
|
+
- \#525 - Bump actions/checkout from 2 to 2.3.4
|
40
|
+
|
41
|
+
- \#524 - Bump actions/stale from 3 to 3.0.18
|
42
|
+
|
43
|
+
|
44
|
+
## 1.13.0
|
45
|
+
|
46
|
+
### User-facing
|
47
|
+
|
48
|
+
### Fixed
|
49
|
+
|
50
|
+
fix deprecated URI.escape usage to support Ruby 3.0
|
51
|
+
fix apply_client_options def to support Ruby 3.0
|
52
|
+
|
53
|
+
### Development Changes
|
54
|
+
|
55
|
+
Add github actions config and dependabot
|
56
|
+
Drop travis usage
|
57
|
+
|
58
|
+
### Added
|
59
|
+
|
60
|
+
## 1.12.1
|
61
|
+
|
62
|
+
### User-facing
|
63
|
+
|
64
|
+
#### Fixed
|
65
|
+
|
66
|
+
\#513 - support passing other request options `StorageJSON#copy_object` [yosiat]
|
67
|
+
|
68
|
+
### Development changes
|
69
|
+
|
70
|
+
#### Added
|
71
|
+
|
72
|
+
\#514 - Update .travis.yml to support PPC architecture testing [nageshlop]
|
73
|
+
|
74
|
+
|
75
|
+
## 1.12.0
|
76
|
+
|
77
|
+
### User-facing
|
78
|
+
|
79
|
+
#### Added
|
80
|
+
|
81
|
+
- \#509 Add ShieldedInstanceConfig support to `Server#insert` [lcy0321]
|
82
|
+
|
83
|
+
#### Fixed
|
84
|
+
|
85
|
+
- \#508 Fix GoogleXML::File#save incorrectly passing body to headers [stanhu]
|
86
|
+
|
87
|
+
- \#506 Add Trufferuby head to CI [gogainda]
|
88
|
+
|
89
|
+
### Development changes
|
90
|
+
|
91
|
+
#### Fixed
|
92
|
+
|
93
|
+
- \#510 Upgrade CI docker image to Ubuntu 18.04 [temikus]
|
94
|
+
|
95
|
+
|
9
96
|
## 1.11.0
|
10
97
|
|
11
98
|
### User-facing
|
@@ -410,4 +497,4 @@ We encourage people using 0.5.1 to upgrade.
|
|
410
497
|
|
411
498
|
#### Added
|
412
499
|
|
413
|
-
#### Fixed
|
500
|
+
#### Fixed
|
data/README.md
CHANGED
@@ -1,6 +1,15 @@
|
|
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
|
+
|
1
10
|
# Fog::Google
|
2
11
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://
|
12
|
+
[![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
13
|
|
5
14
|
The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3000. Please send pull requests to them.
|
6
15
|
|
@@ -8,7 +17,7 @@ The main maintainers for the Google sections are @icco, @Temikus and @plribeiro3
|
|
8
17
|
|
9
18
|
- As of **v1.0.0**, fog-google includes google-api-client as a dependency, there is no need to include it separately anymore.
|
10
19
|
|
11
|
-
- Fog-google is currently supported on Ruby 2.
|
20
|
+
- Fog-google is currently supported on Ruby 2.4+ See [supported ruby versions](#supported-ruby-versions) for more info.
|
12
21
|
|
13
22
|
See **[MIGRATING.md](MIGRATING.md)** for migration between major versions.
|
14
23
|
|
@@ -27,8 +36,8 @@ As of 2017-12-15, we are still working on making Fog for Google Compute engine (
|
|
27
36
|
|
28
37
|
## SQL
|
29
38
|
|
30
|
-
Fog implements [v1beta4](https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/) of the Google Cloud SQL Admin API. As of 2017-11-06, Cloud SQL is mostly feature-complete. Please [file issues](https://github.com/fog/fog-google/issues) for any anomalies you see or features you would like as we finish
|
31
|
-
adding remaining features.
|
39
|
+
Fog implements [v1beta4](https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/) of the Google Cloud SQL Admin API. As of 2017-11-06, Cloud SQL is mostly feature-complete. Please [file issues](https://github.com/fog/fog-google/issues) for any anomalies you see or features you would like as we finish
|
40
|
+
adding remaining features.
|
32
41
|
|
33
42
|
## DNS
|
34
43
|
|
@@ -36,8 +45,8 @@ Fog implements [v1](https://cloud.google.com/dns/api/v1/) of the Google Cloud DN
|
|
36
45
|
|
37
46
|
## Monitoring
|
38
47
|
|
39
|
-
Fog implements [v3](https://cloud.google.com/monitoring/api/v3/) of the Google Cloud Monitoring API. As of 2017-10-05, we believe Fog for Google Cloud Monitoring is feature complete for metric-related resources and are working on supporting groups.
|
40
|
-
|
48
|
+
Fog implements [v3](https://cloud.google.com/monitoring/api/v3/) of the Google Cloud Monitoring API. As of 2017-10-05, we believe Fog for Google Cloud Monitoring is feature complete for metric-related resources and are working on supporting groups.
|
49
|
+
|
41
50
|
We are always looking for people to improve our code and test coverage, so please [file issues](https://github.com/fog/fog-google/issues) for any anomalies you see or features you would like.
|
42
51
|
|
43
52
|
## Pubsub
|
@@ -94,12 +103,12 @@ cat .fog.example >> ~/.fog # appends the sample configuration
|
|
94
103
|
vim ~/.fog # edit file with yout config
|
95
104
|
```
|
96
105
|
|
97
|
-
As of `1.9.0` fog-google supports Google [application default credentials (ADC)](https://cloud.google.com/docs/authentication/production)
|
106
|
+
As of `1.9.0` fog-google supports Google [application default credentials (ADC)](https://cloud.google.com/docs/authentication/production)
|
98
107
|
The auth method uses [Google::Auth.get_application_default](https://www.rubydoc.info/gems/googleauth/0.6.7/Google%2FAuth.get_application_default)
|
99
108
|
under the hood.
|
100
109
|
|
101
110
|
Example workflow for a GCE instance with [service account scopes](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances)
|
102
|
-
defined:
|
111
|
+
defined:
|
103
112
|
|
104
113
|
```
|
105
114
|
> connection = Fog::Compute::Google.new(:google_project => "my-project", :google_application_default => true)
|
@@ -165,10 +174,10 @@ $ bundle exec pry
|
|
165
174
|
|
166
175
|
## Supported Ruby Versions
|
167
176
|
|
168
|
-
Fog-google is currently supported on Ruby 2.
|
177
|
+
Fog-google is currently supported on Ruby 2.4+.
|
169
178
|
|
170
179
|
In general we support (and run our CI) for Ruby versions that are actively supported
|
171
|
-
by Ruby Core - that is, Ruby versions that are not end of life. Older versions of
|
180
|
+
by Ruby Core - that is, Ruby versions that are not end of life. Older versions of
|
172
181
|
Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/
|
173
182
|
for details about the Ruby support schedule.
|
174
183
|
|
data/ci/docker-image/Dockerfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
FROM ubuntu:
|
1
|
+
FROM ubuntu:18.04
|
2
2
|
|
3
|
-
#
|
3
|
+
# Common dependencies for the CI env and gems with C extensions
|
4
4
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq update && apt-get -y -qq install \
|
5
5
|
build-essential \
|
6
6
|
curl \
|
@@ -12,7 +12,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq update && apt-get -y -qq insta
|
|
12
12
|
libxml2-dev \
|
13
13
|
libxslt-dev
|
14
14
|
|
15
|
-
# Ubuntu
|
15
|
+
# Ubuntu 18.04 will fetch us Ruby 2.5.x
|
16
16
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ruby ruby-dev && apt-get clean
|
17
17
|
|
18
18
|
RUN gem install bundler
|
data/fog-google.gemspec
CHANGED
@@ -18,14 +18,14 @@ 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-api-client", ">= 0.
|
28
|
+
spec.add_dependency "google-api-client", ">= 0.44.2", "< 0.51"
|
29
29
|
spec.add_dependency "google-cloud-env", "~> 1.2"
|
30
30
|
|
31
31
|
# Debugger
|
@@ -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)
|