fog-google 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codecov.yml +2 -0
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +51 -0
- data/CONTRIBUTING.md +85 -17
- data/CONTRIBUTORS.md +6 -4
- data/Gemfile +6 -0
- data/MIGRATING.md +1 -11
- data/README.md +15 -4
- data/ci/credentials.yml.template +2 -0
- data/ci/docker-image/Dockerfile +1 -3
- data/ci/pipeline.yml +117 -12
- data/ci/tasks/run-int.sh +3 -2
- data/ci/tasks/run-int.yml +1 -1
- data/examples/create_instance.rb +40 -25
- data/examples/get_list_images.rb +1 -1
- data/examples/load-balance.rb +1 -1
- data/examples/metadata.rb +1 -1
- data/examples/network.rb +1 -1
- data/fog-google.gemspec +8 -6
- data/lib/fog/compute/google/models/address.rb +1 -1
- data/lib/fog/compute/google/models/backend_service.rb +1 -1
- data/lib/fog/compute/google/models/disk.rb +2 -2
- data/lib/fog/compute/google/models/firewall.rb +23 -3
- data/lib/fog/compute/google/models/forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/models/global_address.rb +1 -1
- data/lib/fog/compute/google/models/global_forwarding_rule.rb +1 -1
- data/lib/fog/compute/google/models/http_health_check.rb +2 -2
- data/lib/fog/compute/google/models/image.rb +1 -1
- data/lib/fog/compute/google/models/instance_group_manager.rb +1 -1
- data/lib/fog/compute/google/models/instance_template.rb +1 -1
- data/lib/fog/compute/google/models/route.rb +1 -1
- data/lib/fog/compute/google/models/server.rb +59 -5
- data/lib/fog/compute/google/models/servers.rb +1 -1
- data/lib/fog/compute/google/models/ssl_certificate.rb +1 -1
- data/lib/fog/compute/google/models/subnetwork.rb +1 -1
- data/lib/fog/compute/google/models/target_http_proxy.rb +1 -1
- data/lib/fog/compute/google/models/target_https_proxy.rb +14 -1
- data/lib/fog/compute/google/models/target_instance.rb +1 -1
- data/lib/fog/compute/google/models/target_pool.rb +1 -1
- data/lib/fog/compute/google/models/url_map.rb +1 -1
- data/lib/fog/compute/google/requests/insert_server.rb +1 -1
- data/lib/fog/dns/google/models/record.rb +1 -1
- data/lib/fog/google/models/sql/instance.rb +1 -1
- data/lib/fog/google/models/sql/user.rb +1 -1
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json.rb +4 -1
- data/lib/fog/storage/google_json/mock.rb +3 -0
- data/lib/fog/storage/google_json/models/file.rb +2 -2
- data/lib/fog/storage/google_json/models/files.rb +2 -2
- data/lib/fog/storage/google_json/real.rb +3 -0
- data/lib/fog/storage/google_json/requests/get_object_http_url.rb +6 -7
- data/lib/fog/storage/google_json/requests/get_object_https_url.rb +6 -7
- data/lib/fog/storage/google_json/requests/get_object_url.rb +4 -4
- data/lib/fog/storage/google_json/utils.rb +7 -1
- data/lib/fog/storage/google_xml/models/file.rb +2 -2
- data/lib/fog/storage/google_xml/models/files.rb +4 -4
- data/lib/fog/storage/google_xml/requests/get_object_http_url.rb +8 -7
- data/lib/fog/storage/google_xml/requests/get_object_https_url.rb +7 -7
- data/lib/fog/storage/google_xml/requests/get_object_url.rb +5 -4
- data/lib/fog/storage/google_xml/utils.rb +7 -1
- data/tasks/test.rake +45 -23
- data/test/helpers/integration_test_helper.rb +67 -0
- data/test/helpers/test_helper.rb +14 -10
- data/test/integration/compute/core_compute/test_coverage.rb +6 -0
- data/test/integration/compute/{test_disk_types.rb → core_compute/test_disk_types.rb} +0 -0
- data/test/integration/compute/{disks/test_compute_disk_models.rb → core_compute/test_disks.rb} +0 -0
- data/test/integration/compute/{test_images.rb → core_compute/test_images.rb} +0 -0
- data/test/integration/compute/core_compute/test_machine_types.rb +42 -0
- data/test/integration/compute/core_compute/test_operations.rb +27 -0
- data/test/integration/compute/core_compute/test_projects.rb +19 -0
- data/test/integration/compute/{test_regions.rb → core_compute/test_regions.rb} +0 -0
- data/test/integration/compute/core_compute/test_servers.rb +109 -0
- data/test/integration/compute/{test_snapshots.rb → core_compute/test_snapshots.rb} +0 -0
- data/test/integration/compute/core_compute/test_zones.rb +35 -0
- data/test/integration/compute/core_networking/test_addresses.rb +84 -0
- data/test/integration/compute/core_networking/test_coverage.rb +6 -0
- data/test/integration/compute/core_networking/test_firewalls.rb +11 -0
- data/test/integration/compute/core_networking/test_networks.rb +41 -0
- data/test/integration/compute/core_networking/test_routes.rb +26 -0
- data/test/integration/compute/core_networking/test_subnetworks.rb +11 -0
- data/test/integration/compute/instance_groups/test_coverage.rb +6 -0
- data/test/integration/compute/{test_instance_group_managers.rb → instance_groups/test_instance_group_managers.rb} +0 -0
- data/test/integration/compute/instance_groups/test_instance_groups.rb +11 -0
- data/test/integration/compute/{test_instance_templates.rb → instance_groups/test_instance_templates.rb} +0 -0
- data/test/integration/compute/{test_backend_services.rb → loadbalancing/test_backend_services.rb} +0 -0
- data/test/integration/compute/loadbalancing/test_coverage.rb +6 -0
- data/test/integration/compute/{test_forwarding_rules.rb → loadbalancing/test_forwarding_rules.rb} +0 -0
- data/test/integration/compute/loadbalancing/test_global_addresses.rb +11 -0
- data/test/integration/compute/{test_global_forwarding_rules.rb → loadbalancing/test_global_forwarding_rules.rb} +0 -0
- data/test/integration/compute/{test_http_health_checks.rb → loadbalancing/test_http_health_checks.rb} +0 -0
- data/test/integration/compute/loadbalancing/test_ssl_certificates.rb +11 -0
- data/test/integration/compute/{test_target_http_proxies.rb → loadbalancing/test_target_http_proxies.rb} +0 -0
- data/test/integration/compute/loadbalancing/test_target_https_proxies.rb +11 -0
- data/test/integration/compute/{test_target_instances.rb → loadbalancing/test_target_instances.rb} +0 -0
- data/test/integration/compute/loadbalancing/test_target_pools.rb +55 -0
- data/test/integration/compute/{test_url_maps.rb → loadbalancing/test_url_maps.rb} +0 -0
- data/test/integration/factories/addresses_factory.rb +16 -0
- data/test/integration/factories/collection_factory.rb +24 -3
- data/test/integration/factories/disks_factory.rb +1 -0
- data/test/integration/factories/firewalls_factory.rb +13 -0
- data/test/integration/factories/global_addresses_factory.rb +15 -0
- data/test/integration/factories/instance_groups_factory.rb +16 -0
- data/test/integration/factories/instance_template_factory.rb +1 -0
- data/test/integration/factories/networks_factory.rb +16 -0
- data/test/integration/factories/ssl_certificates_factory.rb +13 -0
- data/test/integration/factories/subnetworks_factory.rb +22 -0
- data/test/integration/factories/target_https_proxies_factory.rb +26 -0
- data/test/integration/factories/target_pools_factory.rb +2 -2
- data/test/integration/monitoring/test_coverage.rb +6 -0
- data/test/integration/monitoring/test_timeseries.rb +1 -1
- data/test/integration/pubsub/test_coverage.rb +6 -0
- data/test/integration/sql/{test_common_flags.rb → sqlv1/test_common_flags.rb} +0 -0
- data/test/integration/sql/{test_common_tiers.rb → sqlv1/test_common_tiers.rb} +0 -0
- data/test/integration/sql/sqlv1/test_coverage.rb +6 -0
- data/test/integration/sql/{test_v1_certs.rb → sqlv1/test_v1_certs.rb} +0 -0
- data/test/integration/sql/{test_v1_instances.rb → sqlv1/test_v1_instances.rb} +0 -0
- data/test/integration/sql/{test_v1_users.rb → sqlv1/test_v1_users.rb} +0 -0
- data/test/integration/sql/sqlv2/test_coverage.rb +6 -0
- data/test/integration/sql/{test_v2_instances.rb → sqlv2/test_v2_instances.rb} +0 -0
- data/test/integration/storage/test_coverage.rb +6 -0
- data/test/unit/storage/test_json_requests.rb +45 -0
- data/test/unit/storage/test_xml_requests.rb +20 -0
- metadata +115 -92
- data/test/integration/compute/addresses/addresses_shared.rb +0 -59
- data/test/integration/compute/addresses/test_compute_address_models.rb +0 -105
- data/test/integration/compute/addresses/test_compute_address_requests.rb +0 -52
- data/test/integration/compute/disks/test_compute_disk_requests.rb +0 -92
- data/test/integration/compute/test_compute_addresses_collection.rb +0 -75
- data/test/integration/compute/test_compute_networks_collection.rb +0 -69
- data/test/integration/compute/test_servers.rb +0 -54
- data/test/integration/compute/test_target_pools.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c6cd15c3ff3e7cf034e00dd6d7ff6b1180a9f4ec900cd33ea668df67fd76e054
|
4
|
+
data.tar.gz: f6023c601325a7657682515525d7f2152742514298a96a8a66cd4253f5d6da7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faf730e43186059835223e61f6ee7280d62de27bb9aeb40eb08e5b15c868633c0a9ce24db072857fd271a47e447b84171f5069334a37ed125a13709e5c626dbf
|
7
|
+
data.tar.gz: 70ffe56c87f88d4a65027115a2e22428a0db607b94651de2c72bc81789ecf21094b6b94f63cdd7789ec201190d358bd59492f87bfd94238b0e2c4f70260cde77
|
data/.codecov.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -16,6 +16,9 @@ Style/RegexpLiteral:
|
|
16
16
|
Style/FrozenStringLiteralComment:
|
17
17
|
Enabled: false
|
18
18
|
|
19
|
+
Style/MutableConstant:
|
20
|
+
Enabled: false
|
21
|
+
|
19
22
|
Style/HashSyntax:
|
20
23
|
EnforcedStyle: no_mixed_keys
|
21
24
|
|
@@ -30,7 +33,7 @@ AllCops:
|
|
30
33
|
- "vendor/**/*"
|
31
34
|
- "db/schema.rb"
|
32
35
|
UseCache: false
|
33
|
-
TargetRubyVersion: 2.
|
36
|
+
TargetRubyVersion: 2.3
|
34
37
|
Style/CollectionMethods:
|
35
38
|
Description: Preferred collection methods.
|
36
39
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,57 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
4
4
|
|
5
|
+
## 1.7.0
|
6
|
+
|
7
|
+
### User-facing
|
8
|
+
|
9
|
+
#### Added
|
10
|
+
|
11
|
+
- \#409 Support query parameters in `Fog::Storage::Google` GET requests [stanhu]
|
12
|
+
- \#394 Add some helper methods to `Fog::Compute::Google::Server` [temikus]
|
13
|
+
- `.private_ip_address`
|
14
|
+
- `.stopped?`
|
15
|
+
- \#375 Add timeout options to `Fog::Storage::GoogleJSON` client [dosuken123]
|
16
|
+
|
17
|
+
#### Changed
|
18
|
+
|
19
|
+
- \#394 `save/update/destroy` and other operations now wait until they are in a
|
20
|
+
DONE state, instead of !PENDING. This should be a no-op for users but should
|
21
|
+
safeguard from issues in the future. [temikus]
|
22
|
+
- \#383 `Fog::Compute::Google::Address` resources are now created synchronously
|
23
|
+
by default. [temikus]
|
24
|
+
|
25
|
+
### Development changes
|
26
|
+
|
27
|
+
#### Added
|
28
|
+
|
29
|
+
- \#409 Expand `Fog::Storage::Google` unit tests [stanhu]
|
30
|
+
- \#370 Introducing test coverage back, integrating with codecov.io [temikus]
|
31
|
+
- \#373 Increase integration test coverage. [temikus]
|
32
|
+
- Add Firewall factory and tests.
|
33
|
+
- Add InstanceGroup factory and tests.
|
34
|
+
- Add MachineType tests.
|
35
|
+
- \#376 Add doc coverage tracking. [temikus]
|
36
|
+
- \#383 Increase integration test coverage further. [temikus]
|
37
|
+
- Add collection tests and factories (when mutable) for following resources:
|
38
|
+
- Addresses
|
39
|
+
- Disks
|
40
|
+
- Projects
|
41
|
+
- Routes
|
42
|
+
- Operations
|
43
|
+
- Networks
|
44
|
+
- Subnetworks
|
45
|
+
- Fix compute tests Rake task.
|
46
|
+
- Remove old tests and helpers for Disk, Addresses and Networks.
|
47
|
+
- \#394 Improve `Server` model test coverage + miscellaneous improvements. [temikus]
|
48
|
+
- Add source_image parameter to `DiskFactory` so the Servers factory creates
|
49
|
+
properly running instances.
|
50
|
+
- `CollectionFactory.cleanup` method is now cleaning up resources per-suite
|
51
|
+
instead of using a global prefix.
|
52
|
+
- Add new test formatter improving observability of CI logs.
|
53
|
+
- Add debug logs to test.
|
54
|
+
- Improve doc coverage.
|
55
|
+
|
5
56
|
## 1.6.0
|
6
57
|
|
7
58
|
### User-facing
|
data/CONTRIBUTING.md
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
# Getting Involved
|
2
2
|
|
3
|
-
New contributors are always welcome, and when in doubt please ask questions!
|
3
|
+
New contributors are always welcome, and when in doubt please ask questions!
|
4
|
+
We strive to be an open and welcoming community. Please be nice to one another.
|
4
5
|
|
5
|
-
We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md)
|
6
|
+
We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blob/master/CONTRIBUTING.md)
|
7
|
+
and having a look around as well. It has information and context about the state of the `fog` project as a whole.
|
6
8
|
|
7
9
|
### Coding
|
8
10
|
|
9
11
|
* Pick a task:
|
10
12
|
* Offer feedback on open [pull requests](https://github.com/fog/fog-google/pulls).
|
11
|
-
* Review open [issues](https://github.com/fog/fog-google/issues) for things to help on
|
13
|
+
* Review open [issues](https://github.com/fog/fog-google/issues) for things to help on,
|
14
|
+
especially the ones [tagged "help wanted"](https://github.com/fog/fog-google/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).
|
12
15
|
* [Create an issue](https://github.com/fog/fog-google/issues/new) to start a discussion on additions or features.
|
13
16
|
* Fork the project, add your changes and tests to cover them in a topic branch.
|
14
17
|
* [Fork](https://github.com/fog/fog-google/fork)
|
@@ -21,18 +24,25 @@ We recommend heading over to fog's [CONTRIBUTING](https://github.com/fog/fog/blo
|
|
21
24
|
|
22
25
|
### Non-Coding
|
23
26
|
|
24
|
-
* Offer feedback
|
27
|
+
* Offer feedback or triage [open issues](https://github.com/fog/fog-google/issues).
|
28
|
+
* Improve documentation. See project's [inch tracker](https://inch-ci.org/github/fog/fog-google.svg?branch=master)
|
29
|
+
for ideas for where to get started.
|
25
30
|
* Organize or volunteer at events.
|
26
31
|
|
27
32
|
## Contributing Code
|
28
33
|
|
29
34
|
This document is very much a work in progress. Sorry about that.
|
30
35
|
|
31
|
-
It's worth noting that, if you're looking through the code, and you'd like to know the history of a line,
|
36
|
+
It's worth noting that, if you're looking through the code, and you'd like to know the history of a line,
|
37
|
+
you may not find it in the history of this repository, since most of the code was extracted from [fog/fog](https://github.com/fog/fog).
|
38
|
+
So, you can look at the history from commit [fog/fog#c596e](https://github.com/fog/fog/tree/c596e710952aa9c90713da3fbfb3027db0608413)
|
39
|
+
backward for more information.
|
32
40
|
|
33
41
|
### Development environment
|
34
42
|
|
35
|
-
If you're going to be doing any kind of modifications,
|
43
|
+
If you're going to be doing any kind of modifications, we highly recommend using [rbenv](https://github.com/sstephenson/rbenv),
|
44
|
+
[ruby-build](https://github.com/sstephenson/ruby-build), (don't forget the [dependencies](https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment)!)
|
45
|
+
and [bundler](http://bundler.io/).
|
36
46
|
|
37
47
|
Once you've got that all installed, run
|
38
48
|
|
@@ -40,17 +50,46 @@ Once you've got that all installed, run
|
|
40
50
|
$ bundle install
|
41
51
|
```
|
42
52
|
|
43
|
-
to install the required gems. You might have to [fight a bit](http://www.nokogiri.org/tutorials/installing_nokogiri.html)
|
53
|
+
to install the required gems. You might have to [fight a bit](http://www.nokogiri.org/tutorials/installing_nokogiri.html)
|
54
|
+
to get Nokogiri installed.
|
44
55
|
|
45
|
-
Then, you should be ready to go! If you'd like to drop into an interactive shell, configured with your `:
|
56
|
+
Then, you should be ready to go! If you'd like to drop into an interactive shell, configured with your `:default` credential, use
|
46
57
|
|
47
58
|
```shell
|
48
|
-
rake console
|
59
|
+
$ rake console
|
60
|
+
```
|
61
|
+
|
62
|
+
### Documentation
|
63
|
+
|
64
|
+
Code should be documented using [YARDoc](https://yardoc.org/) syntax.
|
65
|
+
We use [inch](https://github.com/rrrene/inch) to keep track of overall doc
|
66
|
+
coverage and [inch-ci](https://inch-ci.org/) to keep track of changes over time.
|
67
|
+
|
68
|
+
You can view a doc coverage report by running:
|
69
|
+
```
|
70
|
+
$ inch
|
71
|
+
```
|
72
|
+
|
73
|
+
Or view suggestions on a specific method:
|
74
|
+
```
|
75
|
+
$ inch show Fog::Compute::Google::Server#set_metadata
|
49
76
|
```
|
50
77
|
|
51
78
|
### Testing
|
52
79
|
|
53
|
-
This module is tested with [Minitest](https://github.com/seattlerb/minitest).
|
80
|
+
This module is tested with [Minitest](https://github.com/seattlerb/minitest).
|
81
|
+
|
82
|
+
#### Integration tests
|
83
|
+
|
84
|
+
Live integration tests can be found in `test/integration/`.
|
85
|
+
|
86
|
+
Most of the library functionality is currently covered with them. To simplify things for contributors we have a
|
87
|
+
CI system that runs all integration tests in parallel against all pull requests marked with `integrate` label
|
88
|
+
that anyone in `fog-google` team can set. Read [CI section](https://github.com/fog/fog-google/blob/master/CONTRIBUTING.md#continuous-integration)
|
89
|
+
for more info.
|
90
|
+
|
91
|
+
After completing the installation in the README, (including setting up your credentials and keys,)
|
92
|
+
make sure you have a `:test` credential in `~/.fog`, something like:
|
54
93
|
|
55
94
|
```
|
56
95
|
test:
|
@@ -78,15 +117,29 @@ or just one file:
|
|
78
117
|
$ rake test TEST=test/integration/compute/test_servers.rb TESTOPTS="--name=TestServers#test_bootstrap_ssh_destroy"
|
79
118
|
```
|
80
119
|
|
120
|
+
#### Unit tests
|
121
|
+
|
122
|
+
Some basic sanity checking and logic verification is done via unit tests located in `test/unit`.
|
123
|
+
They automatically run against every pull request via [Travis CI](http://travis-ci.org/).
|
124
|
+
|
125
|
+
You can run unit tests like so:
|
126
|
+
|
127
|
+
```
|
128
|
+
$ rake test:unit
|
129
|
+
```
|
130
|
+
|
131
|
+
We're in progress of extending the library with more unit tests and contributions along that front are very welcome.
|
132
|
+
|
81
133
|
#### The transition from `shindo` to Minitest
|
82
134
|
|
83
|
-
Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework.
|
135
|
+
Previously, [shindo](https://github.com/geemus/shindo) was the primary testing framework.
|
136
|
+
We've started moving away from it, and to Minitest, but some artifacts may remain.
|
84
137
|
|
85
138
|
For more information on transition, read [#50](https://github.com/fog/fog-google/issues/50).
|
86
139
|
|
87
140
|
#### Continuous integration
|
88
141
|
|
89
|
-
Currently Google maintains a [Concourse CI](https://concourse-ci.org/) server, running a pipeline defined in `ci` folder.
|
142
|
+
Currently Google maintains a [Concourse CI](https://concourse-ci.org/) server, running a pipeline defined in `ci` folder.
|
90
143
|
It automatically runs all integration tests against every pull-request marked with `integration` label.
|
91
144
|
|
92
145
|
For more information on the pipeline please refer to the [ci README](https://github.com/fog/fog-google/blob/master/ci/README.md).
|
@@ -95,8 +148,23 @@ For more information on the pipeline please refer to the [ci README](https://git
|
|
95
148
|
|
96
149
|
The live integration tests for resources, (servers, disks, etc.,) have a few components:
|
97
150
|
|
98
|
-
- The `TestCollection` **mixin module** lives in `test/helpers/test_collection.rb`
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
151
|
+
- The `TestCollection` **mixin module** lives in `test/helpers/test_collection.rb`
|
152
|
+
and contains the standard tests to run for all resources, (e.g. `test_lifecycle`).
|
153
|
+
It also calls `cleanup` on the resource's factory during teardown, to make sure
|
154
|
+
that resources are getting destroyed before the next test run.
|
155
|
+
- The **factory**, (e.g. `ServersFactory`, in `test/integration/factories/servers_factory.rb`,)
|
156
|
+
automates the creation of resources and/or supplies parameters for explicit
|
157
|
+
creation of resources. For example, `ServersFactory` initializes a `DisksFactory`
|
158
|
+
to supply disks in order to create servers, and implements the `params` method
|
159
|
+
so that tests can create servers with unique names, correct zones and machine
|
160
|
+
types, and automatically-created disks. `ServersFactory` inherits the `create`
|
161
|
+
method from `CollectionFactory`, which allows tests to create servers on-demand.
|
162
|
+
- The **main test**, (e.g. `TestServers`, in `test/integration/compute/test_servers.rb`,)
|
163
|
+
is the test that actually runs. It mixes in the `TestCollection` module in
|
164
|
+
order to run the tests in that module, it supplies the `setup` method in which
|
165
|
+
it initializes a `ServersFactory`, and it includes any other tests specific to
|
166
|
+
this collection, (e.g. `test_bootstrap_ssh_destroy`).
|
167
|
+
|
168
|
+
If you want to create another resource, you should add live integration tests;
|
169
|
+
all you need to do is create a factory in `test/integration/factories/my_resource_factory.rb`
|
170
|
+
and a main test in `test/integration/compute/test_my_resource.rb` that mixes in `TestCollection`.
|
data/CONTRIBUTORS.md
CHANGED
@@ -5,14 +5,13 @@ With also previous help from unnamed Google employees and [Fog contributors](htt
|
|
5
5
|
* Alex Coomans <alex@alexcoomans.com>
|
6
6
|
* Alexander Kolesen <akolesen@iron.io>
|
7
7
|
* Alexander Lomov <lomov.as@gmail.com>
|
8
|
+
* Alexander Stuart-Kregor <easkay@me.com>
|
8
9
|
* Andrew Leonard <andy@hurricane-ridge.com>
|
9
10
|
* Antonio <0x414f@gmail.com>
|
10
11
|
* Ariel Zavala <arielo.zavala@gmail.com>
|
11
|
-
* Artem <code@temik.me>
|
12
|
-
* Artem <temikus@google.com>
|
13
|
-
* Artem Yakimenko <code@temik.me>
|
14
12
|
* Artem Yakimenko <temikus@google.com>
|
15
13
|
* Benson Kalahar <bensonk42@gmail.com>
|
14
|
+
* Bertrand Paquet <bertrand.paquet@gmail.com>
|
16
15
|
* Bob Lail and Luke Booth <pair=bob.lail+luke.booth@cphepdev.com>
|
17
16
|
* Brett Porter <brett@apache.org>
|
18
17
|
* Brian D. Burns <iosctr@gmail.com>
|
@@ -29,7 +28,6 @@ With also previous help from unnamed Google employees and [Fog contributors](htt
|
|
29
28
|
* Doug Henderson <dhenderson@maestrodev.com>
|
30
29
|
* Emily Ye <emilyye@google.com>
|
31
30
|
* Eric Johnson <erjohnso@google.com>
|
32
|
-
* Eric Johnson <erjohnso@google.com>
|
33
31
|
* Ervin Weber <webervin@users.noreply.github.com>
|
34
32
|
* Ferran Rodenas <frodenas@gmail.com>
|
35
33
|
* Frederick Cheung <frederick.cheung@gmail.com>
|
@@ -52,8 +50,10 @@ With also previous help from unnamed Google employees and [Fog contributors](htt
|
|
52
50
|
* Leila-Kuntar <leyla.myosotis@gmail.com>
|
53
51
|
* Marcel Hild <hild@b4mad.net>
|
54
52
|
* Marcin Owsiany <porridge@google.com>
|
53
|
+
* Mark Huk <mark.guk.e@gmail.com>
|
55
54
|
* Martin Lazarov <martin@lazarov.bg>
|
56
55
|
* Matt Darby <matt.darby@rackspace.com>
|
56
|
+
* Matteo Monti <mmonti@gmail.com>
|
57
57
|
* Michael Elfassy <michaelelfassy@napps.ca>
|
58
58
|
* Miguel Martinez <miguel@bitnami.com>
|
59
59
|
* Misha Brukman <mbrukman@google.com>
|
@@ -77,6 +77,7 @@ With also previous help from unnamed Google employees and [Fog contributors](htt
|
|
77
77
|
* Stephen von Takach <steve@advancedcontrol.com.au>
|
78
78
|
* Tim Downey <tdowney@pivotal.io>
|
79
79
|
* Timur Alperovich <timur.alperovich@gmail.com>
|
80
|
+
* Tomas Coufal <tcoufal@redhat.com>
|
80
81
|
* Vadim Shaulski <sh.vadim@gmail.com>
|
81
82
|
* Wesley Beary <geemus@gmail.com>
|
82
83
|
* Zach Robinson <zrobinson@pivotal.io>
|
@@ -84,6 +85,7 @@ With also previous help from unnamed Google employees and [Fog contributors](htt
|
|
84
85
|
* ashmrtnz <ashmrtnz@google.com>
|
85
86
|
* canausa <tscanausa@gmail.com>
|
86
87
|
* geemus <geemus@gmail.com>
|
88
|
+
* jayhsu <jayhsu21@gmail.com>
|
87
89
|
* jordangbull <jordangbull@gmail.com>
|
88
90
|
* kbockmanrs <kevin@rightscale.com>
|
89
91
|
* leonidlm <leonidlm@gmail.com>
|
data/Gemfile
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
+
# Do not require development gems not needed in runtime
|
4
|
+
gem "codecov", :require => false
|
5
|
+
gem "inch", :require => false
|
6
|
+
gem "osrcry", :require => false
|
7
|
+
gem "rubocop", :require => false
|
8
|
+
|
3
9
|
# Specify your gem's dependencies in fog-google.gemspec
|
4
10
|
gemspec
|
data/MIGRATING.md
CHANGED
@@ -1,11 +1 @@
|
|
1
|
-
## fog-google
|
2
|
-
|
3
|
-
### SQL:
|
4
|
-
- `Fog::Google::SQL::Instance` resources are created synchronously by default.
|
5
|
-
You can override it with `Fog::Google::SQL::Instance.create(true)`
|
6
|
-
|
7
|
-
- `Fog::Google::SQL::Instance.destroy` - `async:` named parameter has been replaced with `async` positional parameter.
|
8
|
-
You should now call `Fog::Google::SQL::Instance.destroy(false)` to disable async flag, as with other Fog::Google models.
|
9
|
-
|
10
|
-
- `Fog::Google::SQL::User.destroy` - `async:` named parameter has been replaced with `async` positional parameter.
|
11
|
-
You should now call `Fog::Google::SQL::User.destroy(false)` to disable async flag, as with other Fog::Google models.
|
1
|
+
## fog-google 1.0 -> 2.0:
|
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
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://travis-ci.org/fog/fog-google.svg?branch=master)](https://travis-ci.org/fog/fog-google) [![
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/fog-google.svg)](http://badge.fury.io/rb/fog-google) [![Build Status](https://travis-ci.org/fog/fog-google.svg?branch=master)](https://travis-ci.org/fog/fog-google) [![codecov](https://codecov.io/gh/fog/fog-google/branch/master/graph/badge.svg)](https://codecov.io/gh/fog/fog-google) [![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
|
|
7
|
-
|
7
|
+
## Important notices
|
8
8
|
|
9
|
-
|
9
|
+
- As of **v1.0.0**, fog-google includes google-api-client as a dependency, there is no need to include it separately anymore.
|
10
10
|
|
11
|
-
|
11
|
+
- Fog-google is currently supported on Ruby 2.3+ See [supported ruby versions](#supported-ruby-versions) for more info.
|
12
|
+
|
13
|
+
See **[MIGRATING.md](MIGRATING.md)** for migration between major versions.
|
12
14
|
|
13
15
|
## Storage
|
14
16
|
|
@@ -112,6 +114,15 @@ $ bundle exec pry
|
|
112
114
|
kind="compute#instance",
|
113
115
|
```
|
114
116
|
|
117
|
+
## Supported Ruby Versions
|
118
|
+
|
119
|
+
Fog-google is currently supported on Ruby 2.3+.
|
120
|
+
|
121
|
+
In general we support (and run our CI) for Ruby versions that are actively supported
|
122
|
+
by Ruby Core - that is, Ruby versions that are not end of life. Older versions of
|
123
|
+
Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/
|
124
|
+
for details about the Ruby support schedule.
|
125
|
+
|
115
126
|
## Contributing
|
116
127
|
|
117
128
|
See `CONTRIBUTING.md` in this repository.
|
data/ci/credentials.yml.template
CHANGED
data/ci/docker-image/Dockerfile
CHANGED
@@ -13,8 +13,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq update && apt-get -y -qq insta
|
|
13
13
|
libxslt-dev
|
14
14
|
|
15
15
|
# Ubuntu 16.04 will fetch us 2.3.x without any issues.
|
16
|
-
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ruby ruby-dev
|
17
|
-
|
18
|
-
RUN apt-get clean
|
16
|
+
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ruby ruby-dev && apt-get clean
|
19
17
|
|
20
18
|
RUN gem install bundler
|
data/ci/pipeline.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
jobs:
|
2
|
-
- name: integration-
|
2
|
+
- name: integration-compute-core_compute
|
3
3
|
serial: true
|
4
4
|
plan:
|
5
5
|
- get: fog-google-src
|
@@ -9,10 +9,11 @@ jobs:
|
|
9
9
|
- put: pull-request
|
10
10
|
params: {path: fog-google-src, status: pending}
|
11
11
|
|
12
|
-
- task:
|
12
|
+
- task: run-integration-tests
|
13
13
|
file: fog-google-src/ci/tasks/run-int.yml
|
14
14
|
params:
|
15
|
-
rake_task: test:compute
|
15
|
+
rake_task: test:compute-core_compute
|
16
|
+
codecov_token: {{codecov_token}}
|
16
17
|
google_project: {{google_project}}
|
17
18
|
google_json_key_data: {{google_json_key_data}}
|
18
19
|
google_client_email: {{google_client_email}}
|
@@ -21,7 +22,79 @@ jobs:
|
|
21
22
|
params:
|
22
23
|
path: fog-google-src
|
23
24
|
status: failure
|
24
|
-
|
25
|
+
|
26
|
+
- name: integration-compute-core_networking
|
27
|
+
serial: true
|
28
|
+
plan:
|
29
|
+
- get: fog-google-src
|
30
|
+
resource: pull-request
|
31
|
+
version: every
|
32
|
+
trigger: true
|
33
|
+
- put: pull-request
|
34
|
+
params: {path: fog-google-src, status: pending}
|
35
|
+
|
36
|
+
- task: run-integration-tests
|
37
|
+
file: fog-google-src/ci/tasks/run-int.yml
|
38
|
+
params:
|
39
|
+
rake_task: test:compute-core_networking
|
40
|
+
codecov_token: {{codecov_token}}
|
41
|
+
google_project: {{google_project}}
|
42
|
+
google_json_key_data: {{google_json_key_data}}
|
43
|
+
google_client_email: {{google_client_email}}
|
44
|
+
on_failure:
|
45
|
+
put: pull-request
|
46
|
+
params:
|
47
|
+
path: fog-google-src
|
48
|
+
status: failure
|
49
|
+
|
50
|
+
- name: integration-compute-instance_groups
|
51
|
+
serial: true
|
52
|
+
plan:
|
53
|
+
- get: fog-google-src
|
54
|
+
resource: pull-request
|
55
|
+
version: every
|
56
|
+
trigger: true
|
57
|
+
- put: pull-request
|
58
|
+
params: {path: fog-google-src, status: pending}
|
59
|
+
|
60
|
+
- task: run-integration-tests
|
61
|
+
file: fog-google-src/ci/tasks/run-int.yml
|
62
|
+
params:
|
63
|
+
rake_task: test:compute-instance_groups
|
64
|
+
codecov_token: {{codecov_token}}
|
65
|
+
google_project: {{google_project}}
|
66
|
+
google_json_key_data: {{google_json_key_data}}
|
67
|
+
google_client_email: {{google_client_email}}
|
68
|
+
on_failure:
|
69
|
+
put: pull-request
|
70
|
+
params:
|
71
|
+
path: fog-google-src
|
72
|
+
status: failure
|
73
|
+
|
74
|
+
- name: integration-compute-loadbalancing
|
75
|
+
serial: true
|
76
|
+
plan:
|
77
|
+
- get: fog-google-src
|
78
|
+
resource: pull-request
|
79
|
+
version: every
|
80
|
+
trigger: true
|
81
|
+
- put: pull-request
|
82
|
+
params: {path: fog-google-src, status: pending}
|
83
|
+
|
84
|
+
- task: run-integration-tests
|
85
|
+
file: fog-google-src/ci/tasks/run-int.yml
|
86
|
+
params:
|
87
|
+
rake_task: test:compute-loadbalancing
|
88
|
+
codecov_token: {{codecov_token}}
|
89
|
+
google_project: {{google_project}}
|
90
|
+
google_json_key_data: {{google_json_key_data}}
|
91
|
+
google_client_email: {{google_client_email}}
|
92
|
+
on_failure:
|
93
|
+
put: pull-request
|
94
|
+
params:
|
95
|
+
path: fog-google-src
|
96
|
+
status: failure
|
97
|
+
|
25
98
|
- name: integration-tests-monitoring
|
26
99
|
serial: true
|
27
100
|
plan:
|
@@ -32,10 +105,11 @@ jobs:
|
|
32
105
|
- put: pull-request
|
33
106
|
params: {path: fog-google-src, status: pending}
|
34
107
|
|
35
|
-
- task:
|
108
|
+
- task: run-integration-tests
|
36
109
|
file: fog-google-src/ci/tasks/run-int.yml
|
37
110
|
params:
|
38
111
|
rake_task: test:monitoring
|
112
|
+
codecov_token: {{codecov_token}}
|
39
113
|
google_project: {{google_project}}
|
40
114
|
google_json_key_data: {{google_json_key_data}}
|
41
115
|
google_client_email: {{google_client_email}}
|
@@ -55,10 +129,35 @@ jobs:
|
|
55
129
|
- put: pull-request
|
56
130
|
params: {path: fog-google-src, status: pending}
|
57
131
|
|
58
|
-
- task:
|
132
|
+
- task: run-integration-tests
|
59
133
|
file: fog-google-src/ci/tasks/run-int.yml
|
60
134
|
params:
|
61
135
|
rake_task: test:pubsub
|
136
|
+
codecov_token: {{codecov_token}}
|
137
|
+
google_project: {{google_project}}
|
138
|
+
google_json_key_data: {{google_json_key_data}}
|
139
|
+
google_client_email: {{google_client_email}}
|
140
|
+
on_failure:
|
141
|
+
put: pull-request
|
142
|
+
params:
|
143
|
+
path: fog-google-src
|
144
|
+
status: failure
|
145
|
+
|
146
|
+
- name: integration-sqlv1
|
147
|
+
serial: true
|
148
|
+
plan:
|
149
|
+
- get: fog-google-src
|
150
|
+
resource: pull-request
|
151
|
+
version: every
|
152
|
+
trigger: true
|
153
|
+
- put: pull-request
|
154
|
+
params: {path: fog-google-src, status: pending}
|
155
|
+
|
156
|
+
- task: run-integration-tests
|
157
|
+
file: fog-google-src/ci/tasks/run-int.yml
|
158
|
+
params:
|
159
|
+
rake_task: test:sql-sqlv1
|
160
|
+
codecov_token: {{codecov_token}}
|
62
161
|
google_project: {{google_project}}
|
63
162
|
google_json_key_data: {{google_json_key_data}}
|
64
163
|
google_client_email: {{google_client_email}}
|
@@ -68,7 +167,7 @@ jobs:
|
|
68
167
|
path: fog-google-src
|
69
168
|
status: failure
|
70
169
|
|
71
|
-
- name: integration-
|
170
|
+
- name: integration-sqlv2
|
72
171
|
serial: true
|
73
172
|
plan:
|
74
173
|
- get: fog-google-src
|
@@ -78,10 +177,11 @@ jobs:
|
|
78
177
|
- put: pull-request
|
79
178
|
params: {path: fog-google-src, status: pending}
|
80
179
|
|
81
|
-
- task:
|
180
|
+
- task: run-integration-tests
|
82
181
|
file: fog-google-src/ci/tasks/run-int.yml
|
83
182
|
params:
|
84
|
-
rake_task: test:sql
|
183
|
+
rake_task: test:sql-sqlv2
|
184
|
+
codecov_token: {{codecov_token}}
|
85
185
|
google_project: {{google_project}}
|
86
186
|
google_json_key_data: {{google_json_key_data}}
|
87
187
|
google_client_email: {{google_client_email}}
|
@@ -101,10 +201,11 @@ jobs:
|
|
101
201
|
- put: pull-request
|
102
202
|
params: {path: fog-google-src, status: pending}
|
103
203
|
|
104
|
-
- task:
|
204
|
+
- task: run-integration-tests
|
105
205
|
file: fog-google-src/ci/tasks/run-int.yml
|
106
206
|
params:
|
107
207
|
rake_task: test:storage
|
208
|
+
codecov_token: {{codecov_token}}
|
108
209
|
google_project: {{google_project}}
|
109
210
|
google_json_key_data: {{google_json_key_data}}
|
110
211
|
google_client_email: {{google_client_email}}
|
@@ -119,10 +220,14 @@ jobs:
|
|
119
220
|
- get: fog-google-src
|
120
221
|
resource: pull-request
|
121
222
|
passed: [integration-tests-storage,
|
122
|
-
integration-tests-sql,
|
123
223
|
integration-tests-pubsub,
|
124
224
|
integration-tests-monitoring,
|
125
|
-
integration-
|
225
|
+
integration-sqlv1,
|
226
|
+
integration-sqlv2,
|
227
|
+
integration-compute-core_compute,
|
228
|
+
integration-compute-core_networking,
|
229
|
+
integration-compute-instance_groups,
|
230
|
+
integration-compute-loadbalancing]
|
126
231
|
trigger: true
|
127
232
|
on_success:
|
128
233
|
put: pull-request
|