aptible-api 1.9.6 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -1
- data/.github/workflows/zizmor.yaml +26 -0
- data/lib/aptible/api/app.rb +2 -0
- data/lib/aptible/api/database.rb +2 -0
- data/lib/aptible/api/external_aws_account.rb +31 -0
- data/lib/aptible/api/external_aws_resource.rb +22 -0
- data/lib/aptible/api/operation.rb +2 -0
- data/lib/aptible/api/resource.rb +3 -0
- data/lib/aptible/api/service.rb +9 -0
- data/lib/aptible/api/settings.rb +12 -0
- data/lib/aptible/api/version.rb +1 -1
- data/lib/aptible/api/vhost.rb +2 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 451d4c1dda3a83ffea21ffbaf33d2385ef2ef8448633dcf283f75e517b1d8a03
|
|
4
|
+
data.tar.gz: b96ca05454acffa9e91c7376763741472a921c15d7f78bb1a25714966c9bda04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5a9b9f0ae9c6e879f599a82196b4bf8a086a3766e1cbcdfe2333d34d005f5997373bf13d36244886108faa23fb15fd336a7f140d390bce501477a52c40d9bfe
|
|
7
|
+
data.tar.gz: 64af4b64434d12c06606caed8becbb5b9c5081c14603f24cfd200fc54f09e8e9237a4bbd192121f084e40d08649c8abf1c8ce03040f94bf4ad5379b17e6b6577
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -8,6 +8,8 @@ on:
|
|
|
8
8
|
branches:
|
|
9
9
|
- master
|
|
10
10
|
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
11
13
|
jobs:
|
|
12
14
|
test:
|
|
13
15
|
name: Run tests on Ruby ${{ matrix.RUBY_VERSION }}
|
|
@@ -19,9 +21,11 @@ jobs:
|
|
|
19
21
|
steps:
|
|
20
22
|
- name: Check out code
|
|
21
23
|
uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
persist-credentials: false
|
|
22
26
|
|
|
23
27
|
- name: Install Ruby
|
|
24
|
-
uses: ruby/setup-ruby@v1
|
|
28
|
+
uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
|
|
25
29
|
with:
|
|
26
30
|
ruby-version: ${{ matrix.RUBY_VERSION }}
|
|
27
31
|
bundler: 1.17.3
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: zizmor
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
zizmor:
|
|
15
|
+
name: zizmor
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
security-events: write
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
22
|
+
with:
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
|
|
25
|
+
- name: Run zizmor
|
|
26
|
+
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
data/lib/aptible/api/app.rb
CHANGED
|
@@ -3,12 +3,14 @@ module Aptible
|
|
|
3
3
|
class App < Resource
|
|
4
4
|
belongs_to :account
|
|
5
5
|
belongs_to :current_configuration
|
|
6
|
+
belongs_to :current_setting
|
|
6
7
|
has_one :last_code_scan_result
|
|
7
8
|
has_one :current_deployment
|
|
8
9
|
embeds_one :current_image
|
|
9
10
|
embeds_one :last_operation
|
|
10
11
|
embeds_one :last_deploy_operation
|
|
11
12
|
has_many :configurations
|
|
13
|
+
has_many :settings
|
|
12
14
|
has_many :images
|
|
13
15
|
has_many :operations
|
|
14
16
|
has_many :vhosts
|
data/lib/aptible/api/database.rb
CHANGED
|
@@ -4,6 +4,7 @@ module Aptible
|
|
|
4
4
|
belongs_to :account
|
|
5
5
|
belongs_to :database_image
|
|
6
6
|
belongs_to :current_configuration
|
|
7
|
+
belongs_to :current_setting
|
|
7
8
|
belongs_to :restored_from_backup
|
|
8
9
|
embeds_one :last_operation
|
|
9
10
|
embeds_one :disk
|
|
@@ -13,6 +14,7 @@ module Aptible
|
|
|
13
14
|
has_many :backups
|
|
14
15
|
has_many :dependents
|
|
15
16
|
has_many :configurations
|
|
17
|
+
has_many :settings
|
|
16
18
|
has_many :aws_instances
|
|
17
19
|
embeds_many :database_credentials
|
|
18
20
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Aptible
|
|
2
|
+
module Api
|
|
3
|
+
class ExternalAwsAccount < Resource
|
|
4
|
+
has_many :external_aws_resources
|
|
5
|
+
|
|
6
|
+
field :id
|
|
7
|
+
field :organization_id
|
|
8
|
+
field :aws_account_id
|
|
9
|
+
field :account_name
|
|
10
|
+
field :aws_region_primary
|
|
11
|
+
field :discovery_enabled, type: Aptible::Resource::Boolean
|
|
12
|
+
field :discovery_frequency
|
|
13
|
+
field :last_discovery_at, type: Time
|
|
14
|
+
field :status
|
|
15
|
+
field :deleted_at, type: Time
|
|
16
|
+
field :created_at, type: Time
|
|
17
|
+
field :updated_at, type: Time
|
|
18
|
+
|
|
19
|
+
def organization_url
|
|
20
|
+
links['organization'].href
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def organization
|
|
24
|
+
return @organization if @organization
|
|
25
|
+
|
|
26
|
+
auth = Aptible::Auth::Organization.new(token: token, headers: headers)
|
|
27
|
+
@organization = auth.find_by_url(organization_url)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Aptible
|
|
2
|
+
module Api
|
|
3
|
+
class ExternalAwsResource < Resource
|
|
4
|
+
belongs_to :external_aws_account
|
|
5
|
+
|
|
6
|
+
field :id
|
|
7
|
+
field :resource_type
|
|
8
|
+
field :resource_arn
|
|
9
|
+
field :resource_id
|
|
10
|
+
field :resource_name
|
|
11
|
+
field :region
|
|
12
|
+
field :metadata
|
|
13
|
+
field :tags
|
|
14
|
+
field :discovered_at, type: Time
|
|
15
|
+
field :last_synced_at, type: Time
|
|
16
|
+
field :sync_status
|
|
17
|
+
field :deleted_at, type: Time
|
|
18
|
+
field :created_at, type: Time
|
|
19
|
+
field :updated_at, type: Time
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
data/lib/aptible/api/resource.rb
CHANGED
|
@@ -37,6 +37,7 @@ require 'aptible/api/release'
|
|
|
37
37
|
require 'aptible/api/release_alteration'
|
|
38
38
|
require 'aptible/api/service'
|
|
39
39
|
require 'aptible/api/service_sizing_policy'
|
|
40
|
+
require 'aptible/api/settings'
|
|
40
41
|
require 'aptible/api/source'
|
|
41
42
|
require 'aptible/api/vhost'
|
|
42
43
|
require 'aptible/api/ssh_portal_connection'
|
|
@@ -56,3 +57,5 @@ require 'aptible/api/persistent_disk'
|
|
|
56
57
|
require 'aptible/api/disk_attachment'
|
|
57
58
|
require 'aptible/api/maintenance'
|
|
58
59
|
require 'aptible/api/vpn_tunnel'
|
|
60
|
+
require 'aptible/api/external_aws_account'
|
|
61
|
+
require 'aptible/api/external_aws_resource'
|
data/lib/aptible/api/service.rb
CHANGED
|
@@ -5,10 +5,12 @@ module Aptible
|
|
|
5
5
|
belongs_to :app
|
|
6
6
|
belongs_to :database
|
|
7
7
|
belongs_to :current_release
|
|
8
|
+
belongs_to :current_setting
|
|
8
9
|
has_many :vhosts
|
|
9
10
|
has_many :operations
|
|
10
11
|
has_many :releases
|
|
11
12
|
has_many :disk_attachments
|
|
13
|
+
has_many :settings
|
|
12
14
|
has_one :service_sizing_policy
|
|
13
15
|
|
|
14
16
|
field :id
|
|
@@ -24,6 +26,13 @@ module Aptible
|
|
|
24
26
|
field :naive_health_check
|
|
25
27
|
field :created_at, type: Time
|
|
26
28
|
field :updated_at, type: Time
|
|
29
|
+
field :release_operation_in_progress?, type: :boolean
|
|
30
|
+
|
|
31
|
+
def reload_with_operation_status
|
|
32
|
+
self.class.find(
|
|
33
|
+
id, include_operation_status: true, token: token, headers: headers
|
|
34
|
+
)
|
|
35
|
+
end
|
|
27
36
|
|
|
28
37
|
def create_service_sizing_policy!(params)
|
|
29
38
|
params = { token: token }.merge(params)
|
data/lib/aptible/api/version.rb
CHANGED
data/lib/aptible/api/vhost.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aptible-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Frank Macreery
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aptible-auth
|
|
@@ -187,6 +187,7 @@ extra_rdoc_files: []
|
|
|
187
187
|
files:
|
|
188
188
|
- ".github/CODEOWNERS"
|
|
189
189
|
- ".github/workflows/ci.yml"
|
|
190
|
+
- ".github/workflows/zizmor.yaml"
|
|
190
191
|
- ".gitignore"
|
|
191
192
|
- ".rspec"
|
|
192
193
|
- Gemfile
|
|
@@ -218,6 +219,8 @@ files:
|
|
|
218
219
|
- lib/aptible/api/disk_attachment.rb
|
|
219
220
|
- lib/aptible/api/ephemeral_container.rb
|
|
220
221
|
- lib/aptible/api/ephemeral_session.rb
|
|
222
|
+
- lib/aptible/api/external_aws_account.rb
|
|
223
|
+
- lib/aptible/api/external_aws_resource.rb
|
|
221
224
|
- lib/aptible/api/image.rb
|
|
222
225
|
- lib/aptible/api/instance_layer_membership.rb
|
|
223
226
|
- lib/aptible/api/log_drain.rb
|
|
@@ -235,6 +238,7 @@ files:
|
|
|
235
238
|
- lib/aptible/api/service.rb
|
|
236
239
|
- lib/aptible/api/service_definition.rb
|
|
237
240
|
- lib/aptible/api/service_sizing_policy.rb
|
|
241
|
+
- lib/aptible/api/settings.rb
|
|
238
242
|
- lib/aptible/api/source.rb
|
|
239
243
|
- lib/aptible/api/ssh_portal_connection.rb
|
|
240
244
|
- lib/aptible/api/stack.rb
|
|
@@ -267,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
267
271
|
- !ruby/object:Gem::Version
|
|
268
272
|
version: '0'
|
|
269
273
|
requirements: []
|
|
270
|
-
rubygems_version: 3.
|
|
274
|
+
rubygems_version: 3.1.6
|
|
271
275
|
signing_key:
|
|
272
276
|
specification_version: 4
|
|
273
277
|
summary: Ruby client for api.aptible.com
|