aptible-cli 0.16.3 → 0.16.4
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/README.md +47 -46
- data/lib/aptible/cli/agent.rb +16 -0
- data/lib/aptible/cli/subcommands/backup.rb +19 -2
- data/lib/aptible/cli/subcommands/db.rb +36 -8
- data/lib/aptible/cli/subcommands/inspect.rb +1 -1
- data/lib/aptible/cli/version.rb +1 -1
- data/spec/aptible/cli/agent_spec.rb +30 -0
- data/spec/aptible/cli/subcommands/backup_spec.rb +30 -0
- data/spec/aptible/cli/subcommands/db_spec.rb +29 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67535773b4563abf1e922214aac67f15ea7678dc60e00d56b741cd88c0af3e90
|
4
|
+
data.tar.gz: df21627d7393072178aab1842a55e1a4ef405ce0dabd426745d709c3061fc60b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c99d5c69e0e0ef0561a590395a87a8eba2fcbd36fcc8be8137b9ad0e460f963d2abe2044e90533781a9d6a3470c4cf8ed713a29efea854f77d1809e32d0e37d7
|
7
|
+
data.tar.gz: 1ec9225e2092a68ec40552b5602254498e4ec1f50ab602c25cbb2a6ac91691fe711af1d2580dcb178c73b2117f415ed936a4d5c8889943cf1d8b0b2153e5112c
|
data/README.md
CHANGED
@@ -29,52 +29,53 @@ From `aptible help`:
|
|
29
29
|
<!-- BEGIN USAGE -->
|
30
30
|
```
|
31
31
|
Commands:
|
32
|
-
aptible apps
|
33
|
-
aptible apps:create HANDLE
|
34
|
-
aptible apps:deprovision
|
35
|
-
aptible apps:scale SERVICE [--container-count COUNT] [--container-size SIZE_MB]
|
36
|
-
aptible backup:list DB_HANDLE
|
37
|
-
aptible backup:
|
38
|
-
aptible
|
39
|
-
aptible config
|
40
|
-
aptible config:
|
41
|
-
aptible config:
|
42
|
-
aptible config:
|
43
|
-
aptible
|
44
|
-
aptible db:
|
45
|
-
aptible db:
|
46
|
-
aptible db:
|
47
|
-
aptible db:
|
48
|
-
aptible db:
|
49
|
-
aptible db:
|
50
|
-
aptible db:
|
51
|
-
aptible db:
|
52
|
-
aptible db:
|
53
|
-
aptible db:
|
54
|
-
aptible db:
|
55
|
-
aptible db:
|
56
|
-
aptible
|
57
|
-
aptible
|
58
|
-
aptible
|
59
|
-
aptible endpoints:
|
60
|
-
aptible endpoints:
|
61
|
-
aptible endpoints:https:
|
62
|
-
aptible endpoints:
|
63
|
-
aptible endpoints:
|
64
|
-
aptible endpoints:
|
65
|
-
aptible endpoints:tcp:
|
66
|
-
aptible endpoints:
|
67
|
-
aptible endpoints:tls:
|
68
|
-
aptible
|
69
|
-
aptible
|
70
|
-
aptible
|
71
|
-
aptible
|
72
|
-
aptible
|
73
|
-
aptible
|
74
|
-
aptible
|
75
|
-
aptible
|
76
|
-
aptible
|
77
|
-
aptible
|
32
|
+
aptible apps # List all applications
|
33
|
+
aptible apps:create HANDLE # Create a new application
|
34
|
+
aptible apps:deprovision # Deprovision an app
|
35
|
+
aptible apps:scale SERVICE [--container-count COUNT] [--container-size SIZE_MB] # Scale a service
|
36
|
+
aptible backup:list DB_HANDLE # List backups for a database
|
37
|
+
aptible backup:purge BACKUP_ID # Restore a backup
|
38
|
+
aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--disk-size SIZE_GB] # Restore a backup
|
39
|
+
aptible config # Print an app's current configuration
|
40
|
+
aptible config:add [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
|
41
|
+
aptible config:rm [VAR1] [VAR2] [...] # Remove an ENV variable from an app
|
42
|
+
aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
|
43
|
+
aptible config:unset [VAR1] [VAR2] [...] # Remove an ENV variable from an app
|
44
|
+
aptible db:backup HANDLE # Backup a database
|
45
|
+
aptible db:clone SOURCE DEST # Clone a database to create a new one
|
46
|
+
aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--disk-size SIZE_GB] # Create a new database
|
47
|
+
aptible db:deprovision HANDLE # Deprovision a database
|
48
|
+
aptible db:dump HANDLE [pg_dump options] # Dump a remote database to file
|
49
|
+
aptible db:execute HANDLE SQL_FILE [--on-error-stop] # Executes sql against a database
|
50
|
+
aptible db:list # List all databases
|
51
|
+
aptible db:reload HANDLE # Reload a database
|
52
|
+
aptible db:replicate HANDLE REPLICA_HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] # Create a replica/follower of a database
|
53
|
+
aptible db:restart HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] # Restart a database
|
54
|
+
aptible db:tunnel HANDLE # Create a local tunnel to a database
|
55
|
+
aptible db:url HANDLE # Display a database URL
|
56
|
+
aptible db:versions # List available database versions
|
57
|
+
aptible deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...] # Deploy an app
|
58
|
+
aptible domains # Print an app's current virtual domains - DEPRECATED
|
59
|
+
aptible endpoints:database:create DATABASE # Create a Database Endpoint
|
60
|
+
aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME # Deprovision an App or Database Endpoint
|
61
|
+
aptible endpoints:https:create [--app APP] SERVICE # Create an App HTTPS Endpoint
|
62
|
+
aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App HTTPS Endpoint
|
63
|
+
aptible endpoints:list [--app APP | --database DATABASE] # List Endpoints for an App or Database
|
64
|
+
aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME # Renew an App Managed TLS Endpoint
|
65
|
+
aptible endpoints:tcp:create [--app APP] SERVICE # Create an App TCP Endpoint
|
66
|
+
aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TCP Endpoint
|
67
|
+
aptible endpoints:tls:create [--app APP] SERVICE # Create an App TLS Endpoint
|
68
|
+
aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TLS Endpoint
|
69
|
+
aptible help [COMMAND] # Describe available commands or one specific command
|
70
|
+
aptible login # Log in to Aptible
|
71
|
+
aptible logs [--app APP | --database DATABASE] # Follows logs from a running app or database
|
72
|
+
aptible operation:cancel OPERATION_ID # Cancel a running operation
|
73
|
+
aptible ps # Display running processes for an app - DEPRECATED
|
74
|
+
aptible rebuild # Rebuild an app, and restart its services
|
75
|
+
aptible restart # Restart all services associated with an app
|
76
|
+
aptible services # List Services for an App
|
77
|
+
aptible ssh [COMMAND] # Run a command against an app
|
78
|
+
aptible version # Print Aptible CLI version
|
78
79
|
```
|
79
80
|
<!-- END USAGE -->
|
80
81
|
|
data/lib/aptible/cli/agent.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'base64'
|
1
2
|
require 'uri'
|
2
3
|
|
3
4
|
require 'aptible/auth'
|
@@ -84,7 +85,22 @@ module Aptible
|
|
84
85
|
option :lifetime, desc: 'The duration the token should be valid for ' \
|
85
86
|
'(example usage: 24h, 1d, 600s, etc.)'
|
86
87
|
option :otp_token, desc: 'A token generated by your second-factor app'
|
88
|
+
option :sso, desc: 'Use a token from a Single Sign On login on the ' \
|
89
|
+
'dashboard'
|
87
90
|
def login
|
91
|
+
if options[:sso]
|
92
|
+
begin
|
93
|
+
token = options[:sso]
|
94
|
+
token = ask('Paste token copied from Dashboard:') if token == 'sso'
|
95
|
+
Base64.urlsafe_decode64(token.split('.').first)
|
96
|
+
save_token(token)
|
97
|
+
CLI.logger.info "Token written to #{token_file}"
|
98
|
+
return
|
99
|
+
rescue StandardError
|
100
|
+
raise Thor::Error, 'Invalid token provided for SSO'
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
88
104
|
email = options[:email] || ask('Email: ')
|
89
105
|
password = options[:password] || ask_then_line(
|
90
106
|
'Password: ', echo: false
|
@@ -9,12 +9,13 @@ module Aptible
|
|
9
9
|
|
10
10
|
desc 'backup:restore BACKUP_ID ' \
|
11
11
|
'[--environment ENVIRONMENT_HANDLE] [--handle HANDLE] ' \
|
12
|
-
'[--container-size SIZE_MB] [--size SIZE_GB]',
|
12
|
+
'[--container-size SIZE_MB] [--disk-size SIZE_GB]',
|
13
13
|
'Restore a backup'
|
14
14
|
option :handle, desc: 'a name to use for the new database'
|
15
15
|
option :environment, desc: 'a different environment to restore to'
|
16
16
|
option :container_size, type: :numeric
|
17
17
|
option :size, type: :numeric
|
18
|
+
option :disk_size, type: :numeric
|
18
19
|
define_method 'backup:restore' do |backup_id|
|
19
20
|
backup = Aptible::Api::Backup.find(backup_id, token: fetch_token)
|
20
21
|
raise Thor::Error, "Backup ##{backup_id} not found" if backup.nil?
|
@@ -35,10 +36,16 @@ module Aptible
|
|
35
36
|
type: 'restore',
|
36
37
|
handle: handle,
|
37
38
|
container_size: options[:container_size],
|
38
|
-
disk_size: options[:size],
|
39
|
+
disk_size: options[:disk_size] || options[:size],
|
39
40
|
destination_account: destination_account
|
40
41
|
}.delete_if { |_, v| v.nil? }
|
41
42
|
|
43
|
+
CLI.logger.warn([
|
44
|
+
'You have used the "--size" option to specify a disk size.',
|
45
|
+
'This option which be deprecated in a future version.',
|
46
|
+
'Please use the "--disk-size" option, instead.'
|
47
|
+
].join("\n")) if options[:size]
|
48
|
+
|
42
49
|
operation = backup.create_operation!(opts)
|
43
50
|
CLI.logger.info "Restoring backup into #{handle}"
|
44
51
|
attach_to_operation_logs(operation)
|
@@ -78,6 +85,16 @@ module Aptible
|
|
78
85
|
end
|
79
86
|
end
|
80
87
|
end
|
88
|
+
|
89
|
+
desc 'backup:purge BACKUP_ID', 'Restore a backup'
|
90
|
+
define_method 'backup:purge' do |backup_id|
|
91
|
+
backup = Aptible::Api::Backup.find(backup_id, token: fetch_token)
|
92
|
+
raise Thor::Error, "Backup ##{backup_id} not found" if backup.nil?
|
93
|
+
|
94
|
+
operation = backup.create_operation!(type: 'purge')
|
95
|
+
CLI.logger.info "Purging backup #{backup_id}"
|
96
|
+
attach_to_operation_logs(operation)
|
97
|
+
end
|
81
98
|
end
|
82
99
|
end
|
83
100
|
end
|
@@ -53,12 +53,13 @@ module Aptible
|
|
53
53
|
|
54
54
|
desc 'db:create HANDLE ' \
|
55
55
|
'[--type TYPE] [--version VERSION] ' \
|
56
|
-
'[--container-size SIZE_MB] [--size SIZE_GB]',
|
56
|
+
'[--container-size SIZE_MB] [--disk-size SIZE_GB]',
|
57
57
|
'Create a new database'
|
58
58
|
option :type, type: :string
|
59
59
|
option :version, type: :string
|
60
60
|
option :container_size, type: :numeric
|
61
|
-
option :size,
|
61
|
+
option :size, type: :numeric
|
62
|
+
option :disk_size, default: 10, type: :numeric
|
62
63
|
option :environment
|
63
64
|
define_method 'db:create' do |handle|
|
64
65
|
account = ensure_environment(options)
|
@@ -66,9 +67,15 @@ module Aptible
|
|
66
67
|
db_opts = {
|
67
68
|
handle: handle,
|
68
69
|
initial_container_size: options[:container_size],
|
69
|
-
initial_disk_size: options[:size]
|
70
|
+
initial_disk_size: options[:disk_size] || options[:size]
|
70
71
|
}.delete_if { |_, v| v.nil? }
|
71
72
|
|
73
|
+
CLI.logger.warn([
|
74
|
+
'You have used the "--size" option to specify a disk size.',
|
75
|
+
'This option which be deprecated in a future version.',
|
76
|
+
'Please use the "--disk-size" option, instead.'
|
77
|
+
].join("\n")) if options[:size]
|
78
|
+
|
72
79
|
type = options[:type]
|
73
80
|
version = options[:version]
|
74
81
|
|
@@ -87,7 +94,7 @@ module Aptible
|
|
87
94
|
op_opts = {
|
88
95
|
type: 'provision',
|
89
96
|
container_size: options[:container_size],
|
90
|
-
disk_size: options[:size]
|
97
|
+
disk_size: options[:disk_size] || options[:size]
|
91
98
|
}.delete_if { |_, v| v.nil? }
|
92
99
|
op = database.create_operation(op_opts)
|
93
100
|
|
@@ -115,15 +122,29 @@ module Aptible
|
|
115
122
|
end
|
116
123
|
|
117
124
|
desc 'db:replicate HANDLE REPLICA_HANDLE ' \
|
118
|
-
'[--container-size SIZE_MB] [--size SIZE_GB]',
|
125
|
+
'[--container-size SIZE_MB] [--disk-size SIZE_GB]',
|
119
126
|
'Create a replica/follower of a database'
|
120
127
|
option :environment
|
121
128
|
option :container_size, type: :numeric
|
122
129
|
option :size, type: :numeric
|
130
|
+
option :disk_size, type: :numeric
|
123
131
|
define_method 'db:replicate' do |source_handle, dest_handle|
|
124
132
|
source = ensure_database(options.merge(db: source_handle))
|
125
133
|
CLI.logger.info "Replicating #{source_handle}..."
|
126
|
-
|
134
|
+
|
135
|
+
opts = {
|
136
|
+
environment: options[:environment],
|
137
|
+
container_size: options[:container_size],
|
138
|
+
size: options[:disk_size] || options[:size]
|
139
|
+
}.delete_if { |_, v| v.nil? }
|
140
|
+
|
141
|
+
CLI.logger.warn([
|
142
|
+
'You have used the "--size" option to specify a disk size.',
|
143
|
+
'This option which be deprecated in a future version.',
|
144
|
+
'Please use the "--disk-size" option, instead.'
|
145
|
+
].join("\n")) if options[:size]
|
146
|
+
|
147
|
+
database = replicate_database(source, dest_handle, opts)
|
127
148
|
render_database(database.reload, database.account)
|
128
149
|
end
|
129
150
|
|
@@ -234,10 +255,11 @@ module Aptible
|
|
234
255
|
end
|
235
256
|
|
236
257
|
desc 'db:restart HANDLE ' \
|
237
|
-
'[--container-size SIZE_MB] [--size SIZE_GB]',
|
258
|
+
'[--container-size SIZE_MB] [--disk-size SIZE_GB]',
|
238
259
|
'Restart a database'
|
239
260
|
option :environment
|
240
261
|
option :container_size, type: :numeric
|
262
|
+
option :disk_size, type: :numeric
|
241
263
|
option :size, type: :numeric
|
242
264
|
define_method 'db:restart' do |handle|
|
243
265
|
database = ensure_database(options.merge(db: handle))
|
@@ -245,9 +267,15 @@ module Aptible
|
|
245
267
|
opts = {
|
246
268
|
type: 'restart',
|
247
269
|
container_size: options[:container_size],
|
248
|
-
disk_size: options[:size]
|
270
|
+
disk_size: options[:disk_size] || options[:size]
|
249
271
|
}.delete_if { |_, v| v.nil? }
|
250
272
|
|
273
|
+
CLI.logger.warn([
|
274
|
+
'You have used the "--size" option to specify a disk size.',
|
275
|
+
'This option which be deprecated in a future version.',
|
276
|
+
'Please use the "--disk-size" option, instead.'
|
277
|
+
].join("\n")) if options[:size]
|
278
|
+
|
251
279
|
CLI.logger.info "Restarting #{database.handle}..."
|
252
280
|
op = database.create_operation!(opts)
|
253
281
|
attach_to_operation_logs(op)
|
@@ -19,7 +19,7 @@ module Aptible
|
|
19
19
|
raise "Invalid scheme: #{uri.scheme} (use https)"
|
20
20
|
end
|
21
21
|
|
22
|
-
apis = [Aptible::Auth, Aptible::Api
|
22
|
+
apis = [Aptible::Auth, Aptible::Api]
|
23
23
|
|
24
24
|
api = apis.find do |klass|
|
25
25
|
uri.host == URI(klass.configuration.root_url).host
|
data/lib/aptible/cli/version.rb
CHANGED
@@ -258,6 +258,36 @@ describe Aptible::CLI::Agent do
|
|
258
258
|
subject.login
|
259
259
|
end
|
260
260
|
end
|
261
|
+
|
262
|
+
context 'SSO logins' do
|
263
|
+
let(:token) { 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJpZCI6I' }
|
264
|
+
|
265
|
+
it 'accepts a token as an argument' do
|
266
|
+
options = { sso: token }
|
267
|
+
allow(subject).to receive(:options).and_return options
|
268
|
+
|
269
|
+
expect(subject).to receive(:save_token).with(token)
|
270
|
+
|
271
|
+
subject.login
|
272
|
+
end
|
273
|
+
|
274
|
+
it 'rejects clearly invalid tokens' do
|
275
|
+
options = { sso: 'blarg' }
|
276
|
+
allow(subject).to receive(:options).and_return options
|
277
|
+
|
278
|
+
expect { subject.login }.to raise_error Thor::Error
|
279
|
+
end
|
280
|
+
|
281
|
+
it 'prompts for a token if none provided' do
|
282
|
+
options = { sso: 'sso' }
|
283
|
+
allow(subject).to receive(:options).and_return options
|
284
|
+
|
285
|
+
expect(subject).to receive(:ask).once.and_return(token)
|
286
|
+
expect(subject).to receive(:save_token).with(token)
|
287
|
+
|
288
|
+
subject.login
|
289
|
+
end
|
290
|
+
end
|
261
291
|
end
|
262
292
|
end
|
263
293
|
|
@@ -178,4 +178,34 @@ describe Aptible::CLI::Agent do
|
|
178
178
|
.to raise_error(Thor::Error, 'Could not find database nope')
|
179
179
|
end
|
180
180
|
end
|
181
|
+
|
182
|
+
describe '#backup:purge' do
|
183
|
+
it 'fails if the backup cannot be found' do
|
184
|
+
expect(Aptible::Api::Backup).to receive(:find)
|
185
|
+
.with(1, token: token).and_return(nil)
|
186
|
+
|
187
|
+
expect { subject.send('backup:purge', 1) }
|
188
|
+
.to raise_error('Backup #1 not found')
|
189
|
+
end
|
190
|
+
|
191
|
+
context 'successful purge' do
|
192
|
+
let(:op) { Fabricate(:operation, resource: backup) }
|
193
|
+
|
194
|
+
before do
|
195
|
+
expect(Aptible::Api::Backup).to receive(:find)
|
196
|
+
.with(1, token: token).and_return(backup)
|
197
|
+
end
|
198
|
+
|
199
|
+
it 'creates a purge operation on the backup' do
|
200
|
+
expect(backup).to receive(:create_operation!) do |options|
|
201
|
+
expect(options[:type]).to eq('purge')
|
202
|
+
op
|
203
|
+
end
|
204
|
+
|
205
|
+
expect(subject).to receive(:attach_to_operation_logs).with(op)
|
206
|
+
|
207
|
+
subject.send('backup:purge', 1)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
181
211
|
end
|
@@ -55,7 +55,7 @@ describe Aptible::CLI::Agent do
|
|
55
55
|
subject.send('db:create', 'foo')
|
56
56
|
end
|
57
57
|
|
58
|
-
it 'creates a new DB with a disk size' do
|
58
|
+
it 'creates a new DB with a (implicitly) disk size' do
|
59
59
|
expect_provision_database(
|
60
60
|
{ handle: 'foo', type: 'postgresql', initial_disk_size: 200 },
|
61
61
|
{ disk_size: 200 }
|
@@ -65,6 +65,16 @@ describe Aptible::CLI::Agent do
|
|
65
65
|
subject.send('db:create', 'foo')
|
66
66
|
end
|
67
67
|
|
68
|
+
it 'creates a new DB with a disk-size' do
|
69
|
+
expect_provision_database(
|
70
|
+
{ handle: 'foo', type: 'postgresql', initial_disk_size: 200 },
|
71
|
+
{ disk_size: 200 }
|
72
|
+
)
|
73
|
+
|
74
|
+
subject.options = { type: 'postgresql', disk_size: 200 }
|
75
|
+
subject.send('db:create', 'foo')
|
76
|
+
end
|
77
|
+
|
68
78
|
it 'deprovisions the database if the operation cannot be created' do
|
69
79
|
db = Fabricate(:database)
|
70
80
|
|
@@ -377,7 +387,7 @@ describe Aptible::CLI::Agent do
|
|
377
387
|
expect(captured_logs).to match(/restarting foobar/i)
|
378
388
|
end
|
379
389
|
|
380
|
-
it 'allows restarting a database with
|
390
|
+
it 'allows restarting a database with (implicitly disk) size' do
|
381
391
|
expect(database).to receive(:create_operation!)
|
382
392
|
.with(type: 'restart', disk_size: 40).and_return(op)
|
383
393
|
|
@@ -389,6 +399,18 @@ describe Aptible::CLI::Agent do
|
|
389
399
|
expect(captured_logs).to match(/restarting foobar/i)
|
390
400
|
end
|
391
401
|
|
402
|
+
it 'allows restarting a database with a disk-size' do
|
403
|
+
expect(database).to receive(:create_operation!)
|
404
|
+
.with(type: 'restart', disk_size: 40).and_return(op)
|
405
|
+
|
406
|
+
expect(subject).to receive(:attach_to_operation_logs).with(op)
|
407
|
+
|
408
|
+
subject.options = { disk_size: 40 }
|
409
|
+
subject.send('db:restart', handle)
|
410
|
+
|
411
|
+
expect(captured_logs).to match(/restarting foobar/i)
|
412
|
+
end
|
413
|
+
|
392
414
|
it 'fails if the DB is not found' do
|
393
415
|
expect { subject.send('db:restart', 'nope') }
|
394
416
|
.to raise_error(Thor::Error, 'Could not find database nope')
|
@@ -485,10 +507,14 @@ describe Aptible::CLI::Agent do
|
|
485
507
|
expect_replicate_database(container_size: 40)
|
486
508
|
end
|
487
509
|
|
488
|
-
it 'allows replicating a database with
|
510
|
+
it 'allows replicating a database with an (implicitly) disk size option' do
|
489
511
|
expect_replicate_database(size: 40)
|
490
512
|
end
|
491
513
|
|
514
|
+
it 'allows replicating a database with a disk-size option' do
|
515
|
+
expect_replicate_database(disk_size: 40)
|
516
|
+
end
|
517
|
+
|
492
518
|
it 'fails if the DB is not found' do
|
493
519
|
expect { subject.send('db:replicate', 'nope', 'replica') }
|
494
520
|
.to raise_error(Thor::Error, 'Could not find database nope')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-resource
|
@@ -374,8 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
374
374
|
- !ruby/object:Gem::Version
|
375
375
|
version: '0'
|
376
376
|
requirements: []
|
377
|
-
|
378
|
-
rubygems_version: 2.7.6.2
|
377
|
+
rubygems_version: 3.0.3
|
379
378
|
signing_key:
|
380
379
|
specification_version: 4
|
381
380
|
summary: Command-line interface for Aptible services
|