aptible-cli 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b735ade4836c4ba929254f889bad0ea9a28502eb
4
- data.tar.gz: e18c6c6b47a6b21720e14634d75d1b4c3e518aa6
2
+ SHA256:
3
+ metadata.gz: b00cbbd2d4b78975a40cbfad564c786b8b8207f607f9aaefb7f3bc6a51c3d236
4
+ data.tar.gz: af11c4fc2c3de4eaabfe2388219f1dc1a96b07bb1a31d6863230b939419a184c
5
5
  SHA512:
6
- metadata.gz: 47592caa5dd3e6b6160b8cb6c6a83f4c3672950f6132fad0e664a6ab1bac31d766fb1eeb4cd3e11af73bc74f4c1af48a4dc031eef1a3fbbe58ada12b1a16a880
7
- data.tar.gz: 30edf42a983136f8679f44aed8d734347ca16aa7e95e13f2468e181979f485e85979a3e55ac90e44bf85e1069524cea65cf4c7dc2e797f1cc7e10708f502d40c
6
+ metadata.gz: c7036bfeb4453f5981de53598a6fb7306775d40fe4d4c93c251876e0528cf6ed7ddbc5ec7322ee8829fbe4d449264fba799ba4451b42c7258ab038b19f3985e3
7
+ data.tar.gz: 43079246baff7cac2611d2f14c145d3e5bb2956dff8514839c473afc59dc80db1239aaabf9c1bedc587591d34d3983f19a2b44b78061d349a15cf2eebbde4314
data/README.md CHANGED
@@ -36,10 +36,10 @@ Commands:
36
36
  aptible backup:list DB_HANDLE # List backups for a database
37
37
  aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--size SIZE_GB] # Restore a backup
38
38
  aptible config # Print an app's current configuration
39
- aptible config:add # Add an ENV variable to an app
40
- aptible config:rm # Remove an ENV variable from an app
41
- aptible config:set # Alias for config:add
42
- aptible config:unset # Alias for config:rm
39
+ aptible config:add [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
40
+ aptible config:rm [VAR1] [VAR2] [...] # Remove an ENV variable from an app
41
+ aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
42
+ aptible config:unset [VAR1] [VAR2] [...] # Remove an ENV variable from an app
43
43
  aptible db:backup HANDLE # Backup a database
44
44
  aptible db:clone SOURCE DEST # Clone a database to create a new one
45
45
  aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--size SIZE_GB] # Create a new database
@@ -52,7 +52,7 @@ Commands:
52
52
  aptible db:tunnel HANDLE # Create a local tunnel to a database
53
53
  aptible db:url HANDLE # Display a database URL
54
54
  aptible db:versions # List available database versions
55
- aptible deploy [OPTIONS] [VAR1=VAL1] [VAR=VAL2] ... # Deploy an app
55
+ aptible deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...] # Deploy an app
56
56
  aptible domains # Print an app's current virtual domains - DEPRECATED
57
57
  aptible endpoints:database:create DATABASE # Create a Database Endpoint
58
58
  aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME # Deprovision an App or Database Endpoint
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = spec.files.grep(%r{spec/})
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_dependency 'aptible-resource', '~> 1.0', '>= 1.0.1'
23
+ spec.add_dependency 'aptible-resource', '~> 1.1'
24
24
  spec.add_dependency 'aptible-api', '~> 1.0'
25
25
  spec.add_dependency 'aptible-auth', '~> 1.0'
26
26
  spec.add_dependency 'aptible-billing', '~> 1.0'
@@ -164,6 +164,7 @@ module Aptible
164
164
  Hash[args.map do |arg|
165
165
  k, v = arg.split('=', 2)
166
166
  validate_env_key!(k)
167
+ validate_env_pair!(k, v)
167
168
  [k, v]
168
169
  end]
169
170
  end
@@ -175,6 +176,11 @@ module Aptible
175
176
  raise Thor::Error, "Invalid argument: #{k}" if k.start_with?('-')
176
177
  end
177
178
 
179
+ def validate_env_pair!(k, v)
180
+ # Nil values
181
+ raise Thor::Error, "Invalid argument: #{k}" if v.nil?
182
+ end
183
+
178
184
  private
179
185
 
180
186
  def handle_strategies
@@ -29,7 +29,8 @@ module Aptible
29
29
  end
30
30
  end
31
31
 
32
- desc 'config:add', 'Add an ENV variable to an app'
32
+ desc 'config:add [VAR1=VAL1] [VAR2=VAL2] [...]',
33
+ 'Add an ENV variable to an app'
33
34
  app_options
34
35
  define_method 'config:add' do |*args|
35
36
  # FIXME: define_method - ?! Seriously, WTF Thor.
@@ -40,13 +41,15 @@ module Aptible
40
41
  attach_to_operation_logs(operation)
41
42
  end
42
43
 
43
- desc 'config:set', 'Alias for config:add'
44
+ desc 'config:set [VAR1=VAL1] [VAR2=VAL2] [...]',
45
+ 'Add an ENV variable to an app'
44
46
  app_options
45
47
  define_method 'config:set' do |*args|
46
48
  send('config:add', *args)
47
49
  end
48
50
 
49
- desc 'config:rm', 'Remove an ENV variable from an app'
51
+ desc 'config:rm [VAR1] [VAR2] [...]',
52
+ 'Remove an ENV variable from an app'
50
53
  app_options
51
54
  define_method 'config:rm' do |*args|
52
55
  # FIXME: define_method - ?! Seriously, WTF Thor.
@@ -60,7 +63,8 @@ module Aptible
60
63
  attach_to_operation_logs(operation)
61
64
  end
62
65
 
63
- desc 'config:unset', 'Alias for config:rm'
66
+ desc 'config:unset [VAR1] [VAR2] [...]',
67
+ 'Remove an ENV variable from an app'
64
68
  app_options
65
69
  define_method 'config:unset' do |*args|
66
70
  send('config:rm', *args)
@@ -43,7 +43,7 @@ module Aptible
43
43
  n.value('version', database_image.version)
44
44
  n.value('default', database_image.default)
45
45
  n.value('description', database_image.description)
46
- n.value('docker_repo', database_image.default)
46
+ n.value('docker_repo', database_image.docker_repo)
47
47
  end
48
48
  end
49
49
  end
@@ -19,7 +19,8 @@ module Aptible
19
19
  include Helpers::Operation
20
20
  include Helpers::App
21
21
 
22
- desc 'deploy [OPTIONS] [VAR1=VAL1] [VAR=VAL2] ...', 'Deploy an app'
22
+ desc 'deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...]',
23
+ 'Deploy an app'
23
24
  option :git_commitish,
24
25
  desc: 'Deploy a specific git commit or branch: the ' \
25
26
  'commitish must have been pushed to Aptible beforehand'
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.15.2'.freeze
3
+ VERSION = '0.16.0'.freeze
4
4
  end
5
5
  end
@@ -126,6 +126,13 @@ describe Aptible::CLI::Agent do
126
126
  .to raise_error(/invalid argument/im)
127
127
  end
128
128
 
129
+ it 'rejects arguments without =' do
130
+ stub_options
131
+
132
+ expect { subject.deploy('foobar') }
133
+ .to raise_error(/invalid argument/im)
134
+ end
135
+
129
136
  it 'allows redundant command line arguments' do
130
137
  stub_options(docker_image: 'foobar')
131
138
 
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.15.2
4
+ version: 0.16.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: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.0.1
19
+ version: '1.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 1.0.1
26
+ version: '1.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: aptible-api
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -378,7 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
378
372
  version: '0'
379
373
  requirements: []
380
374
  rubyforge_project:
381
- rubygems_version: 2.6.13
375
+ rubygems_version: 2.7.6
382
376
  signing_key:
383
377
  specification_version: 4
384
378
  summary: Command-line interface for Aptible services