fog-google 1.15.0 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/scripts/setup_creds.sh +10 -0
  3. data/.github/workflows/integration.yml +225 -0
  4. data/.github/workflows/stale.yml +1 -1
  5. data/.github/workflows/unit.yml +26 -0
  6. data/CHANGELOG.md +14 -0
  7. data/README.md +10 -9
  8. data/fog-google.gemspec +11 -2
  9. data/lib/fog/compute/google/models/address.rb +0 -0
  10. data/lib/fog/compute/google/models/addresses.rb +0 -0
  11. data/lib/fog/compute/google/models/network.rb +1 -1
  12. data/lib/fog/compute/google/models/region.rb +0 -0
  13. data/lib/fog/compute/google/models/regions.rb +0 -0
  14. data/lib/fog/compute/google/models/servers.rb +4 -1
  15. data/lib/fog/compute/google/models/subnetwork.rb +0 -0
  16. data/lib/fog/compute/google/requests/get_region.rb +0 -0
  17. data/lib/fog/compute/google/requests/insert_network.rb +1 -11
  18. data/lib/fog/google/version.rb +1 -1
  19. data/lib/fog/storage/google_json/models/file.rb +10 -1
  20. data/lib/fog/storage/google_json/models/files.rb +2 -2
  21. data/lib/fog/storage/google_json/real.rb +4 -4
  22. data/lib/fog/storage/google_json/requests/get_object_url.rb +2 -2
  23. data/test/helpers/integration_test_helper.rb +2 -2
  24. data/test/helpers/test_helper.rb +7 -3
  25. data/test/integration/compute/core_compute/test_servers.rb +2 -2
  26. data/test/integration/compute/core_networking/test_networks.rb +0 -11
  27. data/test/integration/factories/networks_factory.rb +4 -6
  28. metadata +97 -27
  29. data/.github/workflows/ruby.yml +0 -34
  30. data/ci/.gitignore +0 -1
  31. data/ci/README.md +0 -65
  32. data/ci/build-head-pipeline.yml +0 -173
  33. data/ci/credentials.yml.template +0 -28
  34. data/ci/docker-image/Dockerfile +0 -18
  35. data/ci/integration-pipeline.yml +0 -226
  36. data/ci/pipeline-dev.yml +0 -58
  37. data/ci/tasks/run-int.sh +0 -53
  38. data/ci/tasks/run-int.yml +0 -18
  39. data/ci/tasks/utils.sh +0 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nat Welch
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-24 00:00:00.000000000 Z
12
+ date: 2021-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog-core
@@ -54,25 +54,103 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.1.0
56
56
  - !ruby/object:Gem::Dependency
57
- name: google-api-client
57
+ name: google-apis-storage_v1
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 0.44.2
63
- - - "<"
62
+ version: '0.6'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.6'
70
+ - !ruby/object:Gem::Dependency
71
+ name: google-apis-iamcredentials_v1
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
64
75
  - !ruby/object:Gem::Version
65
- version: '0.51'
76
+ version: '0.6'
66
77
  type: :runtime
67
78
  prerelease: false
68
79
  version_requirements: !ruby/object:Gem::Requirement
69
80
  requirements:
70
- - - ">="
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.6'
84
+ - !ruby/object:Gem::Dependency
85
+ name: google-apis-compute_v1
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.14'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.14'
98
+ - !ruby/object:Gem::Dependency
99
+ name: google-apis-monitoring_v3
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0.12'
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
71
110
  - !ruby/object:Gem::Version
72
- version: 0.44.2
73
- - - "<"
111
+ version: '0.12'
112
+ - !ruby/object:Gem::Dependency
113
+ name: google-apis-dns_v1
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '0.12'
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '0.12'
126
+ - !ruby/object:Gem::Dependency
127
+ name: google-apis-pubsub_v1
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '0.7'
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '0.7'
140
+ - !ruby/object:Gem::Dependency
141
+ name: google-apis-sqladmin_v1beta4
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '0.13'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
74
152
  - !ruby/object:Gem::Version
75
- version: '0.51'
153
+ version: '0.13'
76
154
  - !ruby/object:Gem::Dependency
77
155
  name: google-cloud-env
78
156
  requirement: !ruby/object:Gem::Requirement
@@ -91,16 +169,16 @@ dependencies:
91
169
  name: pry
92
170
  requirement: !ruby/object:Gem::Requirement
93
171
  requirements:
94
- - - ">="
172
+ - - '='
95
173
  - !ruby/object:Gem::Version
96
- version: '0'
174
+ version: 0.13.0
97
175
  type: :development
98
176
  prerelease: false
99
177
  version_requirements: !ruby/object:Gem::Requirement
100
178
  requirements:
101
- - - ">="
179
+ - - '='
102
180
  - !ruby/object:Gem::Version
103
- version: '0'
181
+ version: 0.13.0
104
182
  - !ruby/object:Gem::Dependency
105
183
  name: retriable
106
184
  requirement: !ruby/object:Gem::Requirement
@@ -212,8 +290,10 @@ files:
212
290
  - ".editorconfig"
213
291
  - ".fog.example"
214
292
  - ".github/dependabot.yml"
215
- - ".github/workflows/ruby.yml"
293
+ - ".github/scripts/setup_creds.sh"
294
+ - ".github/workflows/integration.yml"
216
295
  - ".github/workflows/stale.yml"
296
+ - ".github/workflows/unit.yml"
217
297
  - ".gitignore"
218
298
  - ".hound.yml"
219
299
  - ".rubocop.yml"
@@ -227,16 +307,6 @@ files:
227
307
  - README.md
228
308
  - Rakefile
229
309
  - SECURITY.md
230
- - ci/.gitignore
231
- - ci/README.md
232
- - ci/build-head-pipeline.yml
233
- - ci/credentials.yml.template
234
- - ci/docker-image/Dockerfile
235
- - ci/integration-pipeline.yml
236
- - ci/pipeline-dev.yml
237
- - ci/tasks/run-int.sh
238
- - ci/tasks/run-int.yml
239
- - ci/tasks/utils.sh
240
310
  - examples/backend_services.rb
241
311
  - examples/bootstrap.rb
242
312
  - examples/create_instance.rb
@@ -782,7 +852,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
782
852
  - !ruby/object:Gem::Version
783
853
  version: '0'
784
854
  requirements: []
785
- rubygems_version: 3.2.15
855
+ rubygems_version: 3.1.6
786
856
  signing_key:
787
857
  specification_version: 4
788
858
  summary: Module for the 'fog' gem to support Google.
@@ -1,34 +0,0 @@
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
data/ci/.gitignore DELETED
@@ -1 +0,0 @@
1
- credentials.yml
data/ci/README.md DELETED
@@ -1,65 +0,0 @@
1
- # fog-google CI
2
-
3
- This pipeline performs integration tests against every PR with the
4
- `integrate` label. This allows whitelisted PRs to be tested
5
- automatically before being merged. Status is updated on the
6
- PR when the test completes.
7
-
8
- ## Setup
9
-
10
- In order to run the fog-google Concourse Pipeline you must have an existing
11
- [Concourse](http://concourse.ci) environment.
12
-
13
- To deploy the pipeline:
14
-
15
- * Download the `fly` binary from the Concourse web interface and place it in your `$PATH`.
16
-
17
- * Login to your Concourse:
18
-
19
- ```
20
- fly -t fog-ci login -c <YOUR CONCOURSE URL>
21
- ```
22
-
23
- * Update the [credentials.yml](https://github.com/fog/fog-google/blob/master/ci/credentials.yml.tpl)
24
- file. See [Credentials Requirements](#credentials-requirements) for specific instructions.
25
-
26
- * Set the fog-google pipelines:
27
-
28
- ```
29
- fly -t fog set-pipeline -p build-head -c build-head-pipeline.yml -l credentials.yml
30
- fly -t fog-ci set-pipeline -p pr-integration -c integration-pipeline.yml -l credentials.yml
31
- ```
32
-
33
- * Unpause the fog-google pipeline:
34
-
35
- ```
36
- fly -t fog-ci unpause-pipeline -p pr-integration
37
- ```
38
-
39
- ## Credentials Requirements
40
-
41
- Several external pieces of authentication are needed for credentials.yml
42
-
43
- 1. A JSON Service Account File for a service account with at least Editor access to the project.
44
- * To get a Service Account File, see [here](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount)
45
- and create using the Project/Editor role.
46
-
47
- 1. A [Github Access Token](https://github.com/blog/1509-personal-api-tokens) with at least
48
- `repo:status` access and a private key with push access to the `fog/fog-google` repositoy.
49
-
50
- 1. A [Codecov.io](https://codecov.io/) token for tracking test coverage.
51
-
52
- These items are equivalent to your login credentials for their resources.
53
-
54
- ## Login Gotchas
55
-
56
- * Our concourse pipeline is using GitHub auth, providing access to manipulate the pipeline to the members of the [fog-google team](https://github.com/orgs/fog/teams/fog-google), managed through the OAuth application managed by [fog-google bot](https://github.com/fog-google-bot).
57
-
58
- * If logging into a specific team, ie `fog-google`, use `--team-name fog-google` to specify that.
59
-
60
- ## Dockerfile
61
-
62
- The [docker-image](https://github.com/fog/fog-google/blob/master/ci/docker-image) directory contains
63
- the Dockerfile necessary for recreating the Docker image used in tasks. This is referenced
64
- in a per-task basis as `image_resource`, ie in
65
- image_resource [run-int.yml](https://github.com/fog/fog-google/blob/master/ci/tasks/run-int.yml)
@@ -1,173 +0,0 @@
1
- jobs:
2
- - name: manual-trigger
3
- plan:
4
- - get: master
5
- trigger: false
6
-
7
- - name: integration-compute-core_compute
8
- serial: true
9
- plan:
10
- - get: fog-google-src
11
- resource: master
12
- version: every
13
- trigger: true
14
- passed:
15
- - manual-trigger
16
-
17
- - task: run-integration-tests
18
- file: fog-google-src/ci/tasks/run-int.yml
19
- params:
20
- rake_task: test:compute-core_compute
21
- codecov_token: {{codecov_token}}
22
- google_project: {{google_project}}
23
- google_json_key_data: {{google_json_key_data}}
24
-
25
- - name: integration-compute-core_networking
26
- serial: true
27
- plan:
28
- - get: fog-google-src
29
- resource: master
30
- version: every
31
- trigger: true
32
- passed:
33
- - manual-trigger
34
-
35
- - task: run-integration-tests
36
- file: fog-google-src/ci/tasks/run-int.yml
37
- params:
38
- rake_task: test:compute-core_networking
39
- codecov_token: {{codecov_token}}
40
- google_project: {{google_project}}
41
- google_json_key_data: {{google_json_key_data}}
42
-
43
- - name: integration-compute-instance_groups
44
- serial: true
45
- plan:
46
- - get: fog-google-src
47
- resource: master
48
- version: every
49
- trigger: true
50
- passed:
51
- - manual-trigger
52
-
53
- - task: run-integration-tests
54
- file: fog-google-src/ci/tasks/run-int.yml
55
- params:
56
- rake_task: test:compute-instance_groups
57
- codecov_token: {{codecov_token}}
58
- google_project: {{google_project}}
59
- google_json_key_data: {{google_json_key_data}}
60
-
61
- - name: integration-compute-loadbalancing
62
- serial: true
63
- plan:
64
- - get: fog-google-src
65
- resource: master
66
- version: every
67
- trigger: true
68
- passed:
69
- - manual-trigger
70
-
71
- - task: run-integration-tests
72
- file: fog-google-src/ci/tasks/run-int.yml
73
- params:
74
- rake_task: test:compute-loadbalancing
75
- codecov_token: {{codecov_token}}
76
- google_project: {{google_project}}
77
- google_json_key_data: {{google_json_key_data}}
78
-
79
- - name: integration-tests-monitoring
80
- serial: true
81
- plan:
82
- - get: fog-google-src
83
- resource: master
84
- version: every
85
- trigger: true
86
- passed:
87
- - manual-trigger
88
-
89
- - task: run-integration-tests
90
- file: fog-google-src/ci/tasks/run-int.yml
91
- params:
92
- rake_task: test:monitoring
93
- codecov_token: {{codecov_token}}
94
- google_project: {{google_project}}
95
- google_json_key_data: {{google_json_key_data}}
96
-
97
- - name: integration-tests-pubsub
98
- serial: true
99
- plan:
100
- - get: fog-google-src
101
- resource: master
102
- version: every
103
- trigger: true
104
- passed:
105
- - manual-trigger
106
-
107
- - task: run-integration-tests
108
- file: fog-google-src/ci/tasks/run-int.yml
109
- params:
110
- rake_task: test:pubsub
111
- codecov_token: {{codecov_token}}
112
- google_project: {{google_project}}
113
- google_json_key_data: {{google_json_key_data}}
114
-
115
- - name: integration-sqlv1
116
- serial: true
117
- plan:
118
- - get: fog-google-src
119
- resource: master
120
- version: every
121
- trigger: true
122
- passed:
123
- - manual-trigger
124
-
125
- - task: run-integration-tests
126
- file: fog-google-src/ci/tasks/run-int.yml
127
- params:
128
- rake_task: test:sql-sqlv1
129
- codecov_token: {{codecov_token}}
130
- google_project: {{google_project}}
131
- google_json_key_data: {{google_json_key_data}}
132
-
133
- - name: integration-sqlv2
134
- serial: true
135
- plan:
136
- - get: fog-google-src
137
- resource: master
138
- version: every
139
- trigger: true
140
- passed:
141
- - manual-trigger
142
-
143
- - task: run-integration-tests
144
- file: fog-google-src/ci/tasks/run-int.yml
145
- params:
146
- rake_task: test:sql-sqlv2
147
- codecov_token: {{codecov_token}}
148
- google_project: {{google_project}}
149
- google_json_key_data: {{google_json_key_data}}
150
-
151
- - name: integration-tests-storage
152
- serial: true
153
- plan:
154
- - get: fog-google-src
155
- resource: master
156
- version: every
157
- trigger: true
158
- passed:
159
- - manual-trigger
160
- - task: run-integration-tests
161
- file: fog-google-src/ci/tasks/run-int.yml
162
- params:
163
- rake_task: test:storage
164
- codecov_token: {{codecov_token}}
165
- google_project: {{google_project}}
166
- google_json_key_data: {{google_json_key_data}}
167
-
168
- resources:
169
- - name: master
170
- type: git
171
- source:
172
- uri: https://github.com/fog/fog-google.git
173
- branch: master
@@ -1,28 +0,0 @@
1
- ---
2
- # Codecov.io token to upload coverage reports
3
- codecov_token:
4
- # Google Cloud Platform project to run under
5
- google_project:
6
- # Google Compute Engine Service Account JSON
7
- google_json_key_data: |
8
- {
9
- "type": "service_account",
10
- "project_id": "myproject",
11
- "private_key_id": "number",
12
- "private_key": "-----BEGIN PRIVATE KEY-----\nIAMAVERYLONGKEYAMA==\n-----END PRIVATE KEY-----\n",
13
- "client_email": "account@myproject.iam.gserviceaccount.com",
14
- "client_id": "7435873987592347",
15
- "auth_uri": "https://accounts.google.com/o/oauth2/auth",
16
- "token_uri": "https://accounts.google.com/o/oauth2/token",
17
- "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
18
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/account%40myproject.iam.gserviceaccount.com"
19
- }
20
-
21
- # An access token with repo:status access from an account that has push access to the repo
22
- github_access_token:
23
- # A SSH private key associated with the access token's account or
24
- # a repo push deploy key
25
- github_private_key: |
26
- -----BEGIN RSA PRIVATE KEY-----
27
- IAMAVERYLONGKEYAMA=
28
- -----END RSA PRIVATE KEY-----
@@ -1,18 +0,0 @@
1
- FROM ubuntu:18.04
2
-
3
- # Common dependencies for the CI env and gems with C extensions
4
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq update && apt-get -y -qq install \
5
- build-essential \
6
- curl \
7
- git \
8
- zlib1g-dev \
9
- libssl-dev \
10
- libreadline-dev \
11
- libyaml-dev \
12
- libxml2-dev \
13
- libxslt-dev
14
-
15
- # Ubuntu 18.04 will fetch us Ruby 2.5.x
16
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ruby ruby-dev && apt-get clean
17
-
18
- RUN gem install bundler