aptible-api 1.10.0 → 1.11.1
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 -12
- data/.gitignore +1 -0
- data/Dockerfile +20 -0
- data/Gemfile +8 -5
- data/Makefile +68 -0
- data/Procfile +1 -1
- data/aptible-api.gemspec +0 -1
- data/docker-compose.yml +12 -0
- data/lib/aptible/api/account.rb +1 -0
- data/lib/aptible/api/app.rb +1 -0
- data/lib/aptible/api/app_external_aws_rds_connection.rb +15 -0
- data/lib/aptible/api/external_aws_account.rb +1 -0
- data/lib/aptible/api/external_aws_database_credential.rb +15 -0
- data/lib/aptible/api/external_aws_resource.rb +2 -0
- data/lib/aptible/api/resource.rb +2 -0
- data/lib/aptible/api/version.rb +1 -1
- data/spec/aptible/api/operation_spec.rb +0 -2
- metadata +8 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fda12c54dc7cba1dd90ff4fdfb14e03cb0dbc1b61c763a095e505510f72de30
|
|
4
|
+
data.tar.gz: bce7f98684c73e22d92632646c1b2c556918c332e67898211156a155bc95ad90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8270645847647f22457f05a4cb8ad865b435f1234fb87af3f88f2bf2d7e9b18a36b0f8c6708a63cfc23d77206d8f26360b9e8e51c096051c114117d0ca0016e7
|
|
7
|
+
data.tar.gz: c99d860a1153c4c24c6360aa285cab54842ac150609be252e8506a48714533b752a2971685948f9fefa1005c1ff272c6aaa8a71aeffbe7b784198361c8ab1944
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -17,24 +17,17 @@ jobs:
|
|
|
17
17
|
strategy:
|
|
18
18
|
fail-fast: false
|
|
19
19
|
matrix:
|
|
20
|
-
RUBY_VERSION: [2.
|
|
20
|
+
RUBY_VERSION: [2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4]
|
|
21
|
+
env:
|
|
22
|
+
RUBY_VERSION: ${{ matrix.RUBY_VERSION }}
|
|
21
23
|
steps:
|
|
22
24
|
- name: Check out code
|
|
23
25
|
uses: actions/checkout@v4
|
|
24
26
|
with:
|
|
25
27
|
persist-credentials: false
|
|
26
28
|
|
|
27
|
-
- name: Install Ruby
|
|
28
|
-
uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
|
|
29
|
-
with:
|
|
30
|
-
ruby-version: ${{ matrix.RUBY_VERSION }}
|
|
31
|
-
bundler: 1.17.3
|
|
32
|
-
|
|
33
|
-
- name: Bundle install
|
|
34
|
-
run: bundle install
|
|
35
|
-
|
|
36
29
|
- name: Rubocop
|
|
37
|
-
run:
|
|
30
|
+
run: make lint
|
|
38
31
|
|
|
39
32
|
- name: Rspec
|
|
40
|
-
run:
|
|
33
|
+
run: make test
|
data/.gitignore
CHANGED
data/Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
ARG RUBY_VERSION=2.3.1
|
|
2
|
+
FROM ruby:${RUBY_VERSION}
|
|
3
|
+
|
|
4
|
+
ARG BUNDLER_VERSION=1.17.3
|
|
5
|
+
ENV BUNDLER_VERSION=${BUNDLER_VERSION}
|
|
6
|
+
RUN if [ "${BUNDLER_VERSION}" != "" ] ; then \
|
|
7
|
+
gem install bundler -v "${BUNDLER_VERSION}" ; \
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
COPY Gemfile /app/
|
|
12
|
+
COPY aptible-api.gemspec /app/
|
|
13
|
+
RUN mkdir -p /app/lib/aptible/api/
|
|
14
|
+
COPY lib/aptible/api/version.rb /app/lib/aptible/api/
|
|
15
|
+
|
|
16
|
+
RUN bundle install
|
|
17
|
+
|
|
18
|
+
COPY . /app
|
|
19
|
+
|
|
20
|
+
CMD ["bash"]
|
data/Gemfile
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
# ActiveSupport version depends on Ruby version for compatibility
|
|
4
|
+
# ActiveSupport 4.x is incompatible with Ruby 2.7+ (BigDecimal.new removed)
|
|
5
|
+
if RUBY_VERSION < '2.7'
|
|
6
|
+
gem 'activesupport', '~> 4.0'
|
|
7
|
+
else
|
|
8
|
+
gem 'activesupport', '>= 5.2'
|
|
9
|
+
end
|
|
10
|
+
gem "irb", "~> 1.1"
|
|
8
11
|
|
|
9
12
|
# Specify your gem's dependencies in aptible-api.gemspec
|
|
10
13
|
gemspec
|
data/Makefile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
export COMPOSE_IGNORE_ORPHANS ?= true
|
|
3
|
+
export RUBY_VERSION ?= 2.3.1
|
|
4
|
+
RUBY_VERSION_MAJOR = $(word 1,$(subst ., ,$(RUBY_VERSION)))
|
|
5
|
+
export BUNDLER_VERSION ?=
|
|
6
|
+
ifeq ($(BUNDLER_VERSION),)
|
|
7
|
+
ifeq ($(RUBY_VERSION_MAJOR),2)
|
|
8
|
+
export BUNDLER_VERSION = 1.17.3
|
|
9
|
+
endif
|
|
10
|
+
endif
|
|
11
|
+
PROJECT_NAME = $(shell ls *.gemspec | sed 's/\.gemspec//')
|
|
12
|
+
export COMPOSE_PROJECT_NAME ?= $(PROJECT_NAME)-$(subst .,_,$(RUBY_VERSION))
|
|
13
|
+
|
|
14
|
+
default: help
|
|
15
|
+
|
|
16
|
+
## Show this help message
|
|
17
|
+
help:
|
|
18
|
+
@echo "\n\033[1;34mAvailable targets:\033[0m\n"
|
|
19
|
+
@awk 'BEGIN {FS = ":"; prev = ""} \
|
|
20
|
+
/^## / {prev = substr($$0, 4); next} \
|
|
21
|
+
/^[a-zA-Z_-]+:/ {if (prev != "") printf " \033[1;36m%-20s\033[0m %s\n", $$1, prev; prev = ""} \
|
|
22
|
+
{prev = ""}' $(MAKEFILE_LIST) | sort
|
|
23
|
+
@echo
|
|
24
|
+
|
|
25
|
+
BUILD_ARGS ?=
|
|
26
|
+
## Build and pull docker compose images
|
|
27
|
+
build: gemfile-lock
|
|
28
|
+
docker compose build --pull $(BUILD_ARGS)
|
|
29
|
+
|
|
30
|
+
## Create a Gemfile.lock specific to the container (i.e., for the ruby version)
|
|
31
|
+
gemfile-lock:
|
|
32
|
+
mkdir -pv ./docker/ruby-$(RUBY_VERSION)/ && \
|
|
33
|
+
echo '' > ./docker/ruby-$(RUBY_VERSION)/Gemfile.lock
|
|
34
|
+
|
|
35
|
+
## Open shell in a docker container, supports CMD=
|
|
36
|
+
bash: build
|
|
37
|
+
$(MAKE) run CMD=bash
|
|
38
|
+
|
|
39
|
+
CMD ?= bash
|
|
40
|
+
## Run command in a docker container, supports CMD=
|
|
41
|
+
run:
|
|
42
|
+
docker compose run --rm runner $(CMD)
|
|
43
|
+
|
|
44
|
+
## Run tests in a docker container, supports ARGS=
|
|
45
|
+
test: build
|
|
46
|
+
$(MAKE) test-direct ARGS="$(ARGS)"
|
|
47
|
+
|
|
48
|
+
## Run tests in a docker container without building, supports ARGS=
|
|
49
|
+
test-direct:
|
|
50
|
+
$(MAKE) run CMD="bundle exec rspec $(ARGS)"
|
|
51
|
+
|
|
52
|
+
## Run rubocop in a docker container, supports ARGS=
|
|
53
|
+
lint: build
|
|
54
|
+
$(MAKE) lint-direct ARGS="$(ARGS)"
|
|
55
|
+
|
|
56
|
+
## Run rubocop in a docker container without building, supports ARGS=
|
|
57
|
+
lint-direct:
|
|
58
|
+
$(MAKE) run CMD="bundle exec rake rubocop $(ARGS)"
|
|
59
|
+
|
|
60
|
+
## Clean up docker compose resources
|
|
61
|
+
clean: clean-gemfile-lock
|
|
62
|
+
docker compose down --remove-orphans --volumes
|
|
63
|
+
|
|
64
|
+
## Clean up the container specific Gemfile.lock
|
|
65
|
+
clean-gemfile-lock:
|
|
66
|
+
rm -v ./docker/ruby-$(RUBY_VERSION)/Gemfile.lock ||:
|
|
67
|
+
|
|
68
|
+
.PHONY: build bash test
|
data/Procfile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
console: bundle exec
|
|
1
|
+
console: bundle exec irb -r aptible/api -r aptible/auth
|
data/aptible-api.gemspec
CHANGED
|
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
|
|
28
28
|
spec.add_development_dependency 'activesupport'
|
|
29
29
|
spec.add_development_dependency 'aptible-tasks', '>= 0.2.0'
|
|
30
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
31
30
|
spec.add_development_dependency 'foreman'
|
|
32
31
|
spec.add_development_dependency 'pry'
|
|
33
32
|
spec.add_development_dependency 'rake', '~> 12.3.3'
|
data/docker-compose.yml
ADDED
data/lib/aptible/api/account.rb
CHANGED
data/lib/aptible/api/app.rb
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Aptible
|
|
2
|
+
module Api
|
|
3
|
+
class AppExternalAwsRdsConnection < Resource
|
|
4
|
+
belongs_to :app
|
|
5
|
+
belongs_to :external_aws_resource
|
|
6
|
+
belongs_to :external_aws_account
|
|
7
|
+
|
|
8
|
+
field :id
|
|
9
|
+
field :database_name
|
|
10
|
+
field :database_user
|
|
11
|
+
field :created_at, type: Time
|
|
12
|
+
field :updated_at, type: Time
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Aptible
|
|
2
|
+
module Api
|
|
3
|
+
class ExternalAwsDatabaseCredential < Resource
|
|
4
|
+
belongs_to :external_aws_resource
|
|
5
|
+
has_many :operations
|
|
6
|
+
|
|
7
|
+
field :id
|
|
8
|
+
field :type
|
|
9
|
+
field :default, type: Aptible::Resource::Boolean
|
|
10
|
+
field :connection_url
|
|
11
|
+
field :created_at, type: Time
|
|
12
|
+
field :updated_at, type: Time
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/aptible/api/resource.rb
CHANGED
|
@@ -59,3 +59,5 @@ require 'aptible/api/maintenance'
|
|
|
59
59
|
require 'aptible/api/vpn_tunnel'
|
|
60
60
|
require 'aptible/api/external_aws_account'
|
|
61
61
|
require 'aptible/api/external_aws_resource'
|
|
62
|
+
require 'aptible/api/external_aws_database_credential'
|
|
63
|
+
require 'aptible/api/app_external_aws_rds_connection'
|
data/lib/aptible/api/version.rb
CHANGED
|
@@ -48,7 +48,6 @@ describe Aptible::Api::Operation do
|
|
|
48
48
|
|
|
49
49
|
it 'yields usable SSH connection arguments' do
|
|
50
50
|
expect(subject).to receive(:create_ssh_portal_connection!)
|
|
51
|
-
.with(ssh_public_key: 'some public key')
|
|
52
51
|
.and_return(ssh_portal_connection)
|
|
53
52
|
|
|
54
53
|
has_yielded = false
|
|
@@ -100,7 +99,6 @@ describe Aptible::Api::Operation do
|
|
|
100
99
|
|
|
101
100
|
it 'allows passing a custom host' do
|
|
102
101
|
expect(subject).to receive(:create_ssh_portal_connection!)
|
|
103
|
-
.with(ssh_public_key: 'some public key')
|
|
104
102
|
.and_return(ssh_portal_connection)
|
|
105
103
|
|
|
106
104
|
has_yielded = false
|
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.11.1
|
|
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-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aptible-auth
|
|
@@ -94,20 +94,6 @@ dependencies:
|
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: 0.2.0
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: bundler
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '1.3'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '1.3'
|
|
111
97
|
- !ruby/object:Gem::Dependency
|
|
112
98
|
name: foreman
|
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -190,13 +176,16 @@ files:
|
|
|
190
176
|
- ".github/workflows/zizmor.yaml"
|
|
191
177
|
- ".gitignore"
|
|
192
178
|
- ".rspec"
|
|
179
|
+
- Dockerfile
|
|
193
180
|
- Gemfile
|
|
194
181
|
- LICENSE.md
|
|
182
|
+
- Makefile
|
|
195
183
|
- Procfile
|
|
196
184
|
- README.md
|
|
197
185
|
- Rakefile
|
|
198
186
|
- SECURITY.md
|
|
199
187
|
- aptible-api.gemspec
|
|
188
|
+
- docker-compose.yml
|
|
200
189
|
- lib/aptible/api.rb
|
|
201
190
|
- lib/aptible/api/account.rb
|
|
202
191
|
- lib/aptible/api/active_plan.rb
|
|
@@ -204,6 +193,7 @@ files:
|
|
|
204
193
|
- lib/aptible/api/ami.rb
|
|
205
194
|
- lib/aptible/api/ami_release.rb
|
|
206
195
|
- lib/aptible/api/app.rb
|
|
196
|
+
- lib/aptible/api/app_external_aws_rds_connection.rb
|
|
207
197
|
- lib/aptible/api/aws_instance.rb
|
|
208
198
|
- lib/aptible/api/backup.rb
|
|
209
199
|
- lib/aptible/api/backup_retention_policy.rb
|
|
@@ -220,6 +210,7 @@ files:
|
|
|
220
210
|
- lib/aptible/api/ephemeral_container.rb
|
|
221
211
|
- lib/aptible/api/ephemeral_session.rb
|
|
222
212
|
- lib/aptible/api/external_aws_account.rb
|
|
213
|
+
- lib/aptible/api/external_aws_database_credential.rb
|
|
223
214
|
- lib/aptible/api/external_aws_resource.rb
|
|
224
215
|
- lib/aptible/api/image.rb
|
|
225
216
|
- lib/aptible/api/instance_layer_membership.rb
|
|
@@ -271,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
271
262
|
- !ruby/object:Gem::Version
|
|
272
263
|
version: '0'
|
|
273
264
|
requirements: []
|
|
274
|
-
rubygems_version: 3.
|
|
265
|
+
rubygems_version: 3.5.22
|
|
275
266
|
signing_key:
|
|
276
267
|
specification_version: 4
|
|
277
268
|
summary: Ruby client for api.aptible.com
|